MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / catalogReasoningKey

Function catalogReasoningKey

packages/kosong/src/catalog.ts:143–151  ·  view source on GitHub ↗
(interleaved: CatalogModelEntry['interleaved'])

Source from the content-addressed store, hash-verified

141}
142
143function catalogReasoningKey(interleaved: CatalogModelEntry['interleaved']): string | undefined {
144 // models.dev allows `interleaved: true` as "general support" — read it as
145 // the default `reasoning_content` field so providers without an explicit
146 // field name (e.g. some openai-compatible gateways) still round-trip.
147 if (interleaved === true) return 'reasoning_content';
148 if (typeof interleaved !== 'object' || interleaved === null) return undefined;
149 const field = interleaved.field?.trim();
150 return field !== undefined && field.length > 0 ? field : undefined;
151}
152
153/** Extracts the valid, normalized models from a catalog provider entry. */
154export function catalogProviderModels(entry: CatalogProviderEntry): CatalogModel[] {

Callers 1

catalogModelToCapabilityFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected