@codeworksh/aikit 0.11.0 → 0.12.0-canary.50.1.g9fe7a616
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.mjs +3 -3
- package/{copilot-JLgwmznn.mjs → copilot-DvUXC6Kx.mjs} +2 -2
- package/{copilot-JLgwmznn.mjs.map → copilot-DvUXC6Kx.mjs.map} +1 -1
- package/{copilot-headers-BvQ3FFn-.mjs → copilot-headers-BLnBaJyp.mjs} +2 -2
- package/{copilot-headers-BvQ3FFn-.mjs.map → copilot-headers-BLnBaJyp.mjs.map} +1 -1
- package/{github-copilot-C7oJ2Tfp.mjs → github-copilot-BcmOr0jd.mjs} +2 -2
- package/{github-copilot-C7oJ2Tfp.mjs.map → github-copilot-BcmOr0jd.mjs.map} +1 -1
- package/github-copilot-llyP2NK4.mjs +3 -0
- package/index.d.mts +3 -3
- package/index.mjs +5 -5
- package/index.mjs.map +1 -1
- package/model-Cjp-Dr8V.mjs +13955 -0
- package/model-Cjp-Dr8V.mjs.map +1 -0
- package/{model-DCfjY0fS.d.mts → model-D3wc9-u4.d.mts} +42 -19
- package/modelgen-DXMmI80T.mjs +731 -0
- package/modelgen-DXMmI80T.mjs.map +1 -0
- package/modelgen.d.mts +20 -3
- package/modelgen.mjs +61 -2
- package/modelgen.mjs.map +1 -0
- package/oauth/github/copilot.mjs +1 -1
- package/{openai-codex-Dj0oh0UV.mjs → openai-codex-C1Yb02kM.mjs} +2 -2
- package/{openai-codex-Dj0oh0UV.mjs.map → openai-codex-C1Yb02kM.mjs.map} +1 -1
- package/openai-codex-CHxShIN3.mjs +2 -0
- package/package.json +10 -10
- package/{registry-CfGgGfSs.mjs → registry-u49t0S4S.mjs} +4 -4
- package/{registry-CfGgGfSs.mjs.map → registry-u49t0S4S.mjs.map} +1 -1
- package/github-copilot-CLJx-bcP.mjs +0 -3
- package/model-D-FoGzVN.mjs +0 -522
- package/model-D-FoGzVN.mjs.map +0 -1
- package/modelgen-D6UBM1fq.mjs +0 -561
- package/modelgen-D6UBM1fq.mjs.map +0 -1
- package/openai-codex-CIBVNhQx.mjs +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-Cjp-Dr8V.mjs","names":["dirname","KnownProviderEnum","KnownProviderEnumSchema","Type","ModelCatalogLoadError","bundled","Filesystem.readText","ModelCatalog.KnownProviderEnum","ModelCatalog.KnownProviderEnumSchema","ModelCatalog.ModelCatalogLoadError","Type","ModelCatalog.path","ModelCatalog.get"],"sources":["../../src/utils/lazy.ts","../../src/utils/error.ts","../../src/utils/filesystem.ts","../../src/model/baseline.json","../../src/model/catalog.ts","../../src/model/model.ts"],"sourcesContent":["export function lazy<T>(fn: () => T) {\n\tlet value: T | undefined;\n\tlet loaded = false;\n\n\tconst result = (): T => {\n\t\tif (loaded) return value as T;\n\t\tvalue = fn();\n\t\tloaded = true;\n\t\treturn value as T;\n\t};\n\n\tresult.reset = () => {\n\t\tloaded = false;\n\t\tvalue = undefined;\n\t};\n\n\treturn result;\n}\n","import type { Static, TSchema } from \"typebox\";\n\ntype SchemaLike = TSchema;\ntype StaticData<Data extends SchemaLike> = Static<Data>;\n\nexport abstract class NamedError extends Error {\n\tabstract schema(): SchemaLike;\n\tabstract toObject(): { name: string; data: unknown };\n\n\tstatic create<Name extends string, Data extends SchemaLike>(name: Name, data: Data) {\n\t\tconst schema = {\n\t\t\t$id: name,\n\t\t\ttype: \"object\",\n\t\t\trequired: [\"name\", \"data\"],\n\t\t\tproperties: {\n\t\t\t\tname: {\n\t\t\t\t\tconst: name,\n\t\t\t\t},\n\t\t\t\tdata,\n\t\t\t},\n\t\t} as const;\n\n\t\tconst result = class extends NamedError {\n\t\t\tpublic static readonly Schema = schema;\n\n\t\t\tpublic override readonly name = name as Name;\n\n\t\t\tpublic readonly data: StaticData<Data>;\n\n\t\t\tconstructor(data: StaticData<Data>, options?: ErrorOptions) {\n\t\t\t\tsuper(name, options);\n\t\t\t\tthis.data = data;\n\t\t\t\tthis.name = name;\n\t\t\t}\n\n\t\t\tstatic isInstance(input: unknown): input is InstanceType<typeof result> {\n\t\t\t\treturn typeof input === \"object\" && input !== null && \"name\" in input && input.name === name;\n\t\t\t}\n\n\t\t\tschema() {\n\t\t\t\treturn schema;\n\t\t\t}\n\n\t\t\ttoObject() {\n\t\t\t\treturn {\n\t\t\t\t\tname,\n\t\t\t\t\tdata: this.data,\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\n\t\tObject.defineProperty(result, \"name\", { value: name });\n\t\treturn result;\n\t}\n\n\tpublic static readonly Unknown = NamedError.create(\"UnknownError\", {\n\t\ttype: \"object\",\n\t\trequired: [\"message\"],\n\t\tproperties: {\n\t\t\tmessage: {\n\t\t\t\ttype: \"string\",\n\t\t\t},\n\t\t},\n\t});\n}\n","import { mkdir, readFile, rename, rm, writeFile } from \"fs/promises\";\nimport { dirname } from \"path\";\n\nexport async function readText(path: string): Promise<string> {\n\treturn readFile(path, \"utf-8\");\n}\n\nexport async function readJson<T = unknown>(path: string): Promise<T> {\n\treturn JSON.parse(await readFile(path, \"utf-8\"));\n}\n\nfunction isEnoent(error: unknown): error is { code: \"ENOENT\" } {\n\treturn (\n\t\ttypeof error === \"object\" && error !== null && \"code\" in error && (error as { code: string }).code === \"ENOENT\"\n\t);\n}\n\nexport async function write(path: string, content: string | Buffer | Uint8Array, mode?: number): Promise<void> {\n\ttry {\n\t\tif (mode) {\n\t\t\tawait writeFile(path, content, { mode });\n\t\t} else {\n\t\t\tawait writeFile(path, content);\n\t\t}\n\t} catch (error) {\n\t\tif (isEnoent(error)) {\n\t\t\tawait mkdir(dirname(path), { recursive: true });\n\t\t\tif (mode) {\n\t\t\t\tawait writeFile(path, content, { mode });\n\t\t\t} else {\n\t\t\t\tawait writeFile(path, content);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tthrow error;\n\t}\n}\n\nexport async function writeJson(path: string, data: unknown, mode?: number): Promise<void> {\n\treturn write(path, JSON.stringify(data, null, 2), mode);\n}\n\n/**\n * Write through a temp file and rename it into place, so a concurrent reader\n * sees either the old content or the new, never a partial file.\n */\nexport async function writeAtomic(path: string, content: string | Buffer | Uint8Array): Promise<void> {\n\tconst temp = `${path}.${process.pid}.${Date.now()}.tmp`;\n\ttry {\n\t\tawait write(temp, content);\n\t\tawait rename(temp, path);\n\t} catch (error) {\n\t\tawait rm(temp, { force: true });\n\t\tthrow error;\n\t}\n}\n\nexport async function writeJsonAtomic(path: string, data: unknown): Promise<void> {\n\treturn writeAtomic(path, JSON.stringify(data, null, 2));\n}\n","","import { join, resolve } from \"node:path\";\nimport Type, { type Static } from \"typebox\";\nimport { NamedError } from \"../utils/error.ts\";\nimport * as Filesystem from \"../utils/filesystem.ts\";\nimport { lazy } from \"../utils/lazy.ts\";\nimport bundled from \"./baseline.json\" with { type: \"json\" };\n\n// known AI SDK LLM providers\n// used as the public protocol discriminator for the AI SDK transport layer\nexport const KnownProviderEnum = {\n\tanthropic: \"anthropic\",\n\tgoogle: \"google\",\n\tgoogleVertex: \"google-vertex\",\n\tgoogleVertexAnthropic: \"google-vertex-anthropic\",\n\tgithubCopilot: \"github-copilot\",\n\topenai: \"openai\",\n\topenaiCompatible: \"openai-compatible\",\n\topenaiCodex: \"openai-codex\",\n\topenrouter: \"openrouter\",\n\txai: \"xai\",\n} as const;\nexport const KnownProviderEnumSchema = Type.Union([\n\tType.Literal(KnownProviderEnum.anthropic),\n\tType.Literal(KnownProviderEnum.google),\n\tType.Literal(KnownProviderEnum.googleVertex),\n\tType.Literal(KnownProviderEnum.googleVertexAnthropic),\n\tType.Literal(KnownProviderEnum.githubCopilot),\n\tType.Literal(KnownProviderEnum.openai),\n\tType.Literal(KnownProviderEnum.openaiCompatible),\n\tType.Literal(KnownProviderEnum.openaiCodex),\n\tType.Literal(KnownProviderEnum.openrouter),\n\tType.Literal(KnownProviderEnum.xai),\n]);\nexport type KnownProviderEnum = Static<typeof KnownProviderEnumSchema>;\n\nexport type GeneratedCatalog = Partial<Record<string, Record<string, unknown>>>;\ntype LazyGeneratedCatalog = ReturnType<typeof lazy<Promise<GeneratedCatalog>>>;\n\nexport const ModelCatalogLoadError = NamedError.create(\n\t\"ModelCatalogLoadError\",\n\tType.Object({\n\t\tpath: Type.String(),\n\t\treason: Type.Union([Type.Literal(\"unreadable\"), Type.Literal(\"empty\"), Type.Literal(\"invalid\")]),\n\t\tmessage: Type.String(),\n\t}),\n);\nexport type ModelCatalogLoadError = InstanceType<typeof ModelCatalogLoadError>;\n\nexport function projectRoot(): string {\n\treturn process.cwd();\n}\n\nexport const filename = \"models.gen.json\";\n\nlet configured: string | undefined;\n\n/**\n * Read the catalog from `catalogPath` instead of `./models.gen.json`, for an\n * embedder that keeps it elsewhere. `CODEWORK_MODELS_FILE` still wins.\n */\nexport function configure(catalogPath: string): void {\n\tconfigured = resolve(catalogPath);\n\tdata.reset();\n}\n\nexport function path(): string {\n\treturn resolve(process.env.CODEWORK_MODELS_FILE ?? configured ?? join(projectRoot(), filename));\n}\n\n/**\n * The catalog bundled with aikit for OpenAI, Anthropic and OpenRouter (`aikit modelgen --baseline`),\n * so a first run works before any catalog was generated.\n */\nexport const baseline: GeneratedCatalog = bundled;\n\n/**\n * The catalog at `catalogPath` over the {@link baseline}: a provider the file lists replaces the\n * bundled one, so a fresh generated catalog wins and an older one still gets the bundled providers.\n * A missing file reads as the baseline alone.\n */\nexport async function load(catalogPath = path()): Promise<GeneratedCatalog> {\n\tlet content: string;\n\ttry {\n\t\tcontent = await Filesystem.readText(catalogPath);\n\t} catch (cause) {\n\t\tconst value =\n\t\t\ttypeof cause === \"object\" && cause !== null && \"code\" in cause && typeof cause.code === \"string\"\n\t\t\t\t? cause.code\n\t\t\t\t: undefined;\n\t\tif (value === \"ENOENT\") return { ...baseline };\n\t\tthrow new ModelCatalogLoadError(\n\t\t\t{ path: catalogPath, reason: \"unreadable\", message: `model catalog could not be read at ${catalogPath}` },\n\t\t\t{ cause },\n\t\t);\n\t}\n\tif (!content.trim()) {\n\t\tthrow new ModelCatalogLoadError({\n\t\t\tpath: catalogPath,\n\t\t\treason: \"empty\",\n\t\t\tmessage: `model catalog is empty at ${catalogPath}`,\n\t\t});\n\t}\n\ttry {\n\t\tconst parsed: unknown = JSON.parse(content);\n\t\tif (typeof parsed !== \"object\" || parsed === null || Array.isArray(parsed)) throw new Error(\"expected an object\");\n\t\treturn { ...baseline, ...(parsed as GeneratedCatalog) };\n\t} catch (cause) {\n\t\tthrow new ModelCatalogLoadError(\n\t\t\t{\n\t\t\t\tpath: catalogPath,\n\t\t\t\treason: \"invalid\",\n\t\t\t\tmessage: `model catalog contains invalid json at ${catalogPath}`,\n\t\t\t},\n\t\t\t{ cause },\n\t\t);\n\t}\n}\n\nexport const data: LazyGeneratedCatalog = lazy(() => load());\n\nexport async function get(): Promise<GeneratedCatalog> {\n\treturn data();\n}\n","import Type, { type Static } from \"typebox\";\nimport { lazy } from \"../utils/lazy.ts\";\nimport * as ModelCatalog from \"./catalog.ts\";\n\n// re-export\nexport const KnownProviderEnum = ModelCatalog.KnownProviderEnum;\nexport const KnownProviderEnumSchema = ModelCatalog.KnownProviderEnumSchema;\nexport type KnownProviderEnum = ModelCatalog.KnownProviderEnum;\n\nexport const ModelCatalogLoadError = ModelCatalog.ModelCatalogLoadError;\nexport type ModelCatalogLoadError = ModelCatalog.ModelCatalogLoadError;\n\n// Common reasoning-effort levels used by adapters that expose model reasoning,\n// thinking, or deliberation controls. Protocol-specific layers can map these\n// values to native fields like OpenAI `reasoning_effort`, Anthropic `thinking`,\n// or Gemini `thinkingConfig`.\nexport const ThinkingLevelEnum = {\n\t// Disable explicit reasoning controls when the provider supports turning them off.\n\toff: \"off\",\n\t// Smallest reasoning budget/effort above off; useful for fastest low-cost responses.\n\tminimal: \"minimal\",\n\t// Light reasoning for simple tasks that still benefit from some deliberation.\n\tlow: \"low\",\n\t// Balanced default for general tasks.\n\tmedium: \"medium\",\n\t// Higher reasoning effort for complex coding, analysis, or planning.\n\thigh: \"high\",\n\t// Extra-high reasoning effort for difficult tasks when supported by the model.\n\txhigh: \"xhigh\",\n\t// Maximum provider-defined effort above xhigh when explicitly supported by the model.\n\tmax: \"max\",\n} as const;\n\nexport const ThinkingLevel = Type.Union([\n\tType.Literal(ThinkingLevelEnum.off),\n\tType.Literal(ThinkingLevelEnum.minimal),\n\tType.Literal(ThinkingLevelEnum.low),\n\tType.Literal(ThinkingLevelEnum.medium),\n\tType.Literal(ThinkingLevelEnum.high),\n\tType.Literal(ThinkingLevelEnum.xhigh),\n\tType.Literal(ThinkingLevelEnum.max),\n]);\nexport type ThinkingLevel = Static<typeof ThinkingLevel>;\n\nexport const ActiveThinkingLevel = Type.Union([\n\tType.Literal(ThinkingLevelEnum.minimal),\n\tType.Literal(ThinkingLevelEnum.low),\n\tType.Literal(ThinkingLevelEnum.medium),\n\tType.Literal(ThinkingLevelEnum.high),\n\tType.Literal(ThinkingLevelEnum.xhigh),\n\tType.Literal(ThinkingLevelEnum.max),\n]);\nexport type ActiveThinkingLevel = Static<typeof ActiveThinkingLevel>;\n\nexport const ThinkingBudgets = Type.Partial(Type.Record(ActiveThinkingLevel, Type.Number()));\nexport type ThinkingBudgets = Static<typeof ThinkingBudgets>;\n\n// Note: order of entries matters!\nconst ACTIVE_THINKING_LEVELS = [\n\tThinkingLevelEnum.minimal,\n\tThinkingLevelEnum.low,\n\tThinkingLevelEnum.medium,\n\tThinkingLevelEnum.high,\n\tThinkingLevelEnum.xhigh,\n\tThinkingLevelEnum.max,\n] as const satisfies readonly ActiveThinkingLevel[];\nconst MODEL_THINKING_LEVELS = [\n\tThinkingLevelEnum.off,\n\t...ACTIVE_THINKING_LEVELS,\n] as const satisfies readonly ThinkingLevel[];\n\nexport const ProviderInfo = Type.Object({\n\tid: Type.String(),\n\tname: Type.String(),\n\tsource: Type.Enum([\"env\", \"config\", \"custom\", \"api\", \"unknown\"]),\n\tenv: Type.Array(Type.String()),\n\tkey: Type.Optional(Type.String()), // runtime api/oauth key\n\toptions: Type.Optional(Type.Record(Type.String(), Type.Any())),\n});\nexport type ProviderInfo = Static<typeof ProviderInfo>;\n\nconst InputSchema = Type.Array(Type.Union([Type.Literal(\"text\"), Type.Literal(\"image\")]));\nconst CostRatesSchema = Type.Object({\n\tinput: Type.Number(),\n\toutput: Type.Number(),\n\tcacheRead: Type.Number(),\n\tcacheWrite: Type.Number(),\n});\nconst CostTierSchema = Type.Object({\n\t...CostRatesSchema.properties,\n\tinputTokensAbove: Type.Number(),\n});\nconst CostSchema = Type.Object({\n\t...CostRatesSchema.properties,\n\ttiers: Type.Optional(Type.Array(CostTierSchema)),\n\tserviceTierMultipliers: Type.Optional(Type.Record(Type.String(), Type.Number())),\n});\nconst SupportedProtocolsSchema = Type.Partial(\n\tType.Object({\n\t\tanthropic: KnownProviderEnumSchema,\n\t\tgoogle: KnownProviderEnumSchema,\n\t\tgoogleVertex: KnownProviderEnumSchema,\n\t\tgoogleVertexAnthropic: KnownProviderEnumSchema,\n\t\tgithubCopilot: KnownProviderEnumSchema,\n\t\topenai: KnownProviderEnumSchema,\n\t\topenaiCompatible: KnownProviderEnumSchema,\n\t\topenaiCodex: KnownProviderEnumSchema,\n\t\topenrouter: KnownProviderEnumSchema,\n\t\txai: KnownProviderEnumSchema,\n\t}),\n);\n\nexport const APIMethodEnum = {\n\tlanguageModel: \"languageModel\",\n\tchat: \"chat\",\n\tcompletion: \"completion\",\n\tcompletionModel: \"completionModel\",\n\tmessages: \"messages\",\n\tresponses: \"responses\",\n} as const;\nexport const APIMethodEnumSchema = Type.Union([\n\tType.Literal(APIMethodEnum.languageModel),\n\tType.Literal(APIMethodEnum.chat),\n\tType.Literal(APIMethodEnum.completion),\n\tType.Literal(APIMethodEnum.completionModel),\n\tType.Literal(APIMethodEnum.messages),\n\tType.Literal(APIMethodEnum.responses),\n]);\nexport type APIMethodEnum = Static<typeof APIMethodEnumSchema>;\n\nexport const APIMetadataSchema = Type.Object({\n\tid: Type.Optional(Type.String()),\n\turl: Type.Optional(Type.String()),\n\tmethod: Type.Optional(APIMethodEnumSchema),\n});\nexport type APIMetadata = Static<typeof APIMetadataSchema>;\n\nexport const ThinkingLevelMapSchema = Type.Partial(\n\tType.Record(\n\t\tThinkingLevel, // Safe key validation\n\t\tType.Union([Type.String(), Type.Null()]), // Allowed values\n\t),\n);\nexport type ThinkingLevelMap = Static<typeof ThinkingLevelMapSchema>;\n\n/**\n * The level map for a model that lists the reasoning efforts it accepts (models.dev\n * `reasoning_options`, OpenRouter `supported_efforts`): a level maps to itself only when listed,\n * and off maps to `none` only when `none` is listed (pi). Undefined when nothing usable is listed.\n */\nexport function effortThinkingLevels(efforts: ReadonlyArray<string | null>): ThinkingLevelMap | undefined {\n\tconst supported = new Set(efforts);\n\tif (!ACTIVE_THINKING_LEVELS.some((level) => supported.has(level)) && !supported.has(\"none\")) return undefined;\n\tconst map: ThinkingLevelMap = { off: supported.has(\"none\") ? \"none\" : null };\n\tfor (const level of ACTIVE_THINKING_LEVELS) map[level] = supported.has(level) ? level : null;\n\treturn map;\n}\n\nexport const CompatibilitySchema = Type.Object({\n\t/** The Google protocol accepts thinking levels rather than a token budget. */\n\tsupportsThinkingLevel: Type.Optional(Type.Boolean()),\n\tsupportsToolSearch: Type.Optional(Type.Boolean()),\n\tsupportsAdditionalTools: Type.Optional(Type.Boolean()),\n\tsupportsStrictMode: Type.Optional(Type.Boolean()),\n\tsupportsOpenAIGrammarTools: Type.Optional(Type.Boolean()),\n\t/** The model takes a thinking-token budget as a top-level request field. */\n\tsupportsThinkingTokenBudget: Type.Optional(Type.Boolean()),\n\t/** Claude model that sizes its own thinking, driven by `effort` instead of a token budget. */\n\tforceAdaptiveThinking: Type.Optional(Type.Boolean()),\n\t/** False for a model that rejects a `temperature` field; the request then leaves it out. */\n\tsupportsTemperature: Type.Optional(Type.Boolean()),\n\t/** Name of that field, when it is not the conventional `thinking_token_budget`. */\n\tthinkingTokenBudgetField: Type.Optional(Type.String()),\n});\nexport type Compatibility = Static<typeof CompatibilitySchema>;\n\n/**\n * Claude models that decide their own thinking depth.\n *\n * These take an `effort` level and let the model size each turn's reasoning; the\n * older models take a fixed `budget_tokens` instead. Sending a budget to an\n * adaptive model pins it to one depth for every turn, which is the thing adaptive\n * thinking exists to avoid.\n */\nexport function isAnthropicAdaptiveThinkingModel(modelId: string): boolean {\n\treturn [\n\t\t\"opus-4-6\",\n\t\t\"opus-4.6\",\n\t\t\"opus-4-7\",\n\t\t\"opus-4.7\",\n\t\t\"opus-4-8\",\n\t\t\"opus-4.8\",\n\t\t\"opus-5\",\n\t\t\"opus.5\",\n\t\t\"sonnet-4-6\",\n\t\t\"sonnet-4.6\",\n\t\t\"sonnet-5\",\n\t\t\"sonnet.5\",\n\t\t\"fable-5\",\n\t\t\"haiku-5\",\n\t\t\"haiku.5\",\n\t].some((needle) => modelId.includes(needle));\n}\n\nexport const Schema = Type.Object({\n\tid: Type.String(),\n\tname: Type.String(),\n\tprovider: ProviderInfo,\n\tbaseUrl: Type.String(),\n\treasoning: Type.Boolean(),\n\tthinkingLevelMap: Type.Optional(ThinkingLevelMapSchema),\n\t/** Default budgets; request-level thinkingBudgets take precedence. */\n\tthinkingBudgets: Type.Optional(ThinkingBudgets),\n\tinput: InputSchema,\n\tcost: CostSchema,\n\tcontextWindow: Type.Number(),\n\tmaxTokens: Type.Number(),\n\theaders: Type.Optional(Type.Record(Type.String(), Type.String())),\n\tnpm: Type.Optional(Type.String()),\n\tapi: Type.Optional(APIMetadataSchema),\n\tproviderOptionsKey: Type.Optional(Type.String()),\n\toptions: Type.Optional(Type.Record(Type.String(), Type.Unknown())),\n\tproviderOptions: Type.Optional(Type.Record(Type.String(), Type.Unknown())),\n\tcompat: Type.Optional(CompatibilitySchema),\n\tprotocol: KnownProviderEnumSchema, // provider as the underlying protocol\n\tsupportedProtocols: Type.Optional(SupportedProtocolsSchema), // provider as the underlying supported protocols\n});\n\nexport const ExtrasSchema = Type.Object({});\n\nexport const Info = Type.Evaluate(Type.Intersect([Schema, ExtrasSchema]));\nexport type Info = Static<typeof Info>;\nexport type TModel<TProtocol extends KnownProviderEnum> = Omit<Info, \"protocol\"> & { protocol: TProtocol };\n\nexport function calculateCost(\n\tmodel: Info,\n\tusage: {\n\t\tinput: number;\n\t\toutput: number;\n\t\tcacheRead: number;\n\t\tcacheWrite: number;\n\t\tcacheWrite1h?: number;\n\t\tcost: {\n\t\t\tinput: number;\n\t\t\toutput: number;\n\t\t\tcacheRead: number;\n\t\t\tcacheWrite: number;\n\t\t\ttotal: number;\n\t\t};\n\t},\n): void {\n\tconst inputTokens = usage.input + usage.cacheRead + usage.cacheWrite;\n\tlet rates = model.cost;\n\tlet matchedThreshold = -1;\n\tfor (const tier of model.cost.tiers ?? []) {\n\t\tif (inputTokens > tier.inputTokensAbove && tier.inputTokensAbove > matchedThreshold) {\n\t\t\trates = tier;\n\t\t\tmatchedThreshold = tier.inputTokensAbove;\n\t\t}\n\t}\n\n\t// Anthropic charges 2x base input for 1h cache writes; `cost.cacheWrite` is the 5m rate.\n\tconst longWrite = usage.cacheWrite1h ?? 0;\n\tconst shortWrite = usage.cacheWrite - longWrite;\n\n\tusage.cost.input = (usage.input / 1_000_000) * rates.input;\n\tusage.cost.output = (usage.output / 1_000_000) * rates.output;\n\tusage.cost.cacheRead = (usage.cacheRead / 1_000_000) * rates.cacheRead;\n\tusage.cost.cacheWrite = (rates.cacheWrite * shortWrite + rates.input * 2 * longWrite) / 1_000_000;\n\tusage.cost.total = usage.cost.input + usage.cost.output + usage.cost.cacheRead + usage.cost.cacheWrite;\n}\n\nexport type BuiltInModels = Partial<Record<string, Record<string, Info>>>;\n\nexport function normalizeInput(input?: string[]): Array<\"text\" | \"image\"> {\n\tconst normalized = new Set<\"text\" | \"image\">();\n\tfor (const modality of input ?? [\"text\"]) {\n\t\tif (modality === \"text\" || modality === \"image\") {\n\t\t\tnormalized.add(modality);\n\t\t}\n\t}\n\tif (normalized.size === 0) normalized.add(\"text\");\n\treturn [...normalized];\n}\n\n/** Where the catalog is read from: `CODEWORK_MODELS_FILE`, the configured path, or `./models.gen.json`. */\nexport const catalogPath = ModelCatalog.path;\n\n/** Read the catalog from `path` from now on, dropping whatever was already loaded. */\nexport function configureCatalog(path: string): void {\n\tModelCatalog.configure(path);\n\tregistry.reset();\n}\n\n/** Drop the loaded catalog, so the next lookup re-reads the file -- after it was regenerated. */\nexport function reloadCatalog(): void {\n\tModelCatalog.data.reset();\n\tregistry.reset();\n}\n\nexport async function getBuiltInModels(): Promise<BuiltInModels> {\n\treturn (await ModelCatalog.get()) as BuiltInModels;\n}\n\nexport const registry = lazy(async () => {\n\tconst registry: Map<string, Map<string, Info>> = new Map();\n\tconst models = await getBuiltInModels();\n\tfor (const [provider, value] of Object.entries(models) as Array<[string, Record<string, Info>]>) {\n\t\tconst providerModels = new Map<string, Info>();\n\t\tfor (const [id, model] of Object.entries(value)) {\n\t\t\tproviderModels.set(id, model);\n\t\t}\n\t\tregistry.set(provider, providerModels);\n\t}\n\treturn registry;\n});\n\n/**\n * The key a provider's own option bag is filed under.\n *\n * Providers that speak another provider's protocol still carry their own option\n * namespace, so this is not always the protocol.\n */\n/**\n * The request-body field a model takes its thinking-token budget in, if any.\n *\n * OpenAI-compatible endpoints have no standard place for this, so each one names\n * its own field; a bare `supportsThinkingTokenBudget` means the conventional name.\n */\nexport function thinkingTokenBudgetField(model: Info): string | undefined {\n\tif (model.compat?.thinkingTokenBudgetField) return model.compat.thinkingTokenBudgetField;\n\treturn model.compat?.supportsThinkingTokenBudget ? \"thinking_token_budget\" : undefined;\n}\n\nexport function optionsKey(model: Info): string {\n\treturn model.providerOptionsKey ?? model.protocol;\n}\n\nexport function supportsProtocol(model: Info, protocol: KnownProviderEnum): boolean {\n\tif (model.protocol === protocol) return true;\n\treturn Object.values(model.supportedProtocols ?? {}).includes(protocol);\n}\n\nexport type ProviderToProtocol<TProvider extends string> = TProvider extends KnownProviderEnum\n\t? TProvider\n\t: KnownProviderEnum;\n\nexport async function getModel<\n\tTProvider extends string,\n\tTProtocol extends KnownProviderEnum = ProviderToProtocol<TProvider>,\n>(\n\tprovider: TProvider,\n\tmodel: string,\n\toverrides?: Partial<Info> & { protocol?: TProtocol },\n): Promise<TModel<TProtocol> | undefined> {\n\tconst data = await registry();\n\tconst providerModels = data.get(provider);\n\tconst result = providerModels?.get(model);\n\tif (result && overrides) {\n\t\tif (overrides.protocol && !supportsProtocol(result, overrides.protocol)) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn {\n\t\t\t...result,\n\t\t\t...overrides,\n\t\t} as TModel<TProtocol>;\n\t}\n\treturn result as TModel<TProtocol> | undefined;\n}\n\nexport async function getProviders(): Promise<string[]> {\n\tconst data = await registry();\n\treturn Array.from(data.keys());\n}\n\nexport async function getModels<TProvider extends string>(provider: TProvider): Promise<Info[]> {\n\tconst data = await registry();\n\tconst models = data.get(provider);\n\treturn models ? Array.from(models.values()) : [];\n}\n\n/**\n * Check if two models are equal by comparing both their id and provider id.\n * Returns false if either model is null or undefined.\n */\nexport function modelsAreEqual(a: Info | null | undefined, b: Info | null | undefined): boolean {\n\tif (!a || !b) return false;\n\treturn a.id === b.id && a.provider.id === b.provider.id;\n}\n\nexport function getSupportedThinkingLevels<TProtocol extends KnownProviderEnum>(\n\tmodel: TModel<TProtocol>,\n): ThinkingLevel[] {\n\tif (!model.reasoning) return [\"off\"];\n\n\treturn MODEL_THINKING_LEVELS.filter((level) => {\n\t\tconst mapped = model.thinkingLevelMap?.[level];\n\t\tif (mapped === null) return false;\n\t\tif (level === \"xhigh\" || level === \"max\") return mapped !== undefined;\n\t\treturn true;\n\t});\n}\n\nexport function clampThinkingLevel<TProtocol extends KnownProviderEnum>(\n\tmodel: TModel<TProtocol>,\n\tlevel: ThinkingLevel,\n): ThinkingLevel {\n\tconst availableLevels = getSupportedThinkingLevels(model);\n\tif (availableLevels.includes(level)) return level;\n\n\tconst requestedIndex = MODEL_THINKING_LEVELS.indexOf(level);\n\tif (requestedIndex === -1) return availableLevels[0] ?? \"off\";\n\n\t// walk up the ladder from the point and pick first supported\n\t// biased to avail more thinking, then less not round to nearest.\n\tfor (let i = requestedIndex; i < MODEL_THINKING_LEVELS.length; i++) {\n\t\tconst candidate = MODEL_THINKING_LEVELS[i]!;\n\t\tif (availableLevels.includes(candidate)) return candidate;\n\t}\n\t// otherwise walk down from the point\n\tfor (let i = requestedIndex - 1; i >= 0; i--) {\n\t\tconst candidate = MODEL_THINKING_LEVELS[i]!;\n\t\tif (availableLevels.includes(candidate)) return candidate;\n\t}\n\treturn availableLevels[0] ?? \"off\";\n}\n"],"mappings":";;;;;;AAAA,SAAgB,KAAQ,IAAa;CACpC,IAAI;CACJ,IAAI,SAAS;CAEb,MAAM,eAAkB;EACvB,IAAI,QAAQ,OAAO;EACnB,QAAQ,GAAG;EACX,SAAS;EACT,OAAO;CACR;CAEA,OAAO,cAAc;EACpB,SAAS;EACT,QAAQ,KAAA;CACT;CAEA,OAAO;AACR;;;ACZA,IAAsB,aAAtB,MAAsB,mBAAmB,MAAM;CAI9C,OAAO,OAAqD,MAAY,MAAY;EACnF,MAAM,SAAS;GACd,KAAK;GACL,MAAM;GACN,UAAU,CAAC,QAAQ,MAAM;GACzB,YAAY;IACX,MAAM,EACL,OAAO,KACR;IACA;GACD;EACD;EAEA,MAAM,SAAS,cAAc,WAAW;GACvC,OAAuB,SAAS;GAEhC,OAAgC;GAEhC;GAEA,YAAY,MAAwB,SAAwB;IAC3D,MAAM,MAAM,OAAO;IACnB,KAAK,OAAO;IACZ,KAAK,OAAO;GACb;GAEA,OAAO,WAAW,OAAsD;IACvE,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,UAAU,SAAS,MAAM,SAAS;GACzF;GAEA,SAAS;IACR,OAAO;GACR;GAEA,WAAW;IACV,OAAO;KACN;KACA,MAAM,KAAK;IACZ;GACD;EACD;EAEA,OAAO,eAAe,QAAQ,QAAQ,EAAE,OAAO,KAAK,CAAC;EACrD,OAAO;CACR;CAEA,OAAuB,UAAU,WAAW,OAAO,gBA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
|
declare namespace catalog_d_exports {
|
|
8
|
-
export { GeneratedCatalog, KnownProviderEnum$1 as KnownProviderEnum, KnownProviderEnumSchema$1 as KnownProviderEnumSchema, ModelCatalogLoadError$1 as ModelCatalogLoadError, configure, data, filename, get, load, path, projectRoot };
|
|
8
|
+
export { GeneratedCatalog, KnownProviderEnum$1 as KnownProviderEnum, KnownProviderEnumSchema$1 as KnownProviderEnumSchema, ModelCatalogLoadError$1 as ModelCatalogLoadError, baseline, configure, data, filename, get, load, path, projectRoot };
|
|
9
9
|
}
|
|
10
10
|
declare const KnownProviderEnum$1: {
|
|
11
11
|
readonly anthropic: "anthropic";
|
|
@@ -26,14 +26,14 @@ type LazyGeneratedCatalog = ReturnType<typeof lazy<Promise<GeneratedCatalog>>>;
|
|
|
26
26
|
declare const ModelCatalogLoadError$1: {
|
|
27
27
|
new (data: {
|
|
28
28
|
path: string;
|
|
29
|
-
reason: "empty" | "invalid" | "
|
|
29
|
+
reason: "empty" | "invalid" | "unreadable";
|
|
30
30
|
message: string;
|
|
31
31
|
}, options?: ErrorOptions): {
|
|
32
32
|
cause?: unknown;
|
|
33
33
|
readonly name: "ModelCatalogLoadError";
|
|
34
34
|
readonly data: {
|
|
35
35
|
path: string;
|
|
36
|
-
reason: "empty" | "invalid" | "
|
|
36
|
+
reason: "empty" | "invalid" | "unreadable";
|
|
37
37
|
message: string;
|
|
38
38
|
};
|
|
39
39
|
schema(): {
|
|
@@ -46,7 +46,7 @@ declare const ModelCatalogLoadError$1: {
|
|
|
46
46
|
};
|
|
47
47
|
readonly data: Type$1.TObject<{
|
|
48
48
|
path: Type$1.TString;
|
|
49
|
-
reason: Type$1.TUnion<[Type$1.TLiteral<"
|
|
49
|
+
reason: Type$1.TUnion<[Type$1.TLiteral<"unreadable">, Type$1.TLiteral<"empty">, Type$1.TLiteral<"invalid">]>;
|
|
50
50
|
message: Type$1.TString;
|
|
51
51
|
}>;
|
|
52
52
|
};
|
|
@@ -55,7 +55,7 @@ declare const ModelCatalogLoadError$1: {
|
|
|
55
55
|
name: "ModelCatalogLoadError";
|
|
56
56
|
data: {
|
|
57
57
|
path: string;
|
|
58
|
-
reason: "empty" | "invalid" | "
|
|
58
|
+
reason: "empty" | "invalid" | "unreadable";
|
|
59
59
|
message: string;
|
|
60
60
|
};
|
|
61
61
|
};
|
|
@@ -77,7 +77,7 @@ declare const ModelCatalogLoadError$1: {
|
|
|
77
77
|
};
|
|
78
78
|
readonly data: Type$1.TObject<{
|
|
79
79
|
path: Type$1.TString;
|
|
80
|
-
reason: Type$1.TUnion<[Type$1.TLiteral<"
|
|
80
|
+
reason: Type$1.TUnion<[Type$1.TLiteral<"unreadable">, Type$1.TLiteral<"empty">, Type$1.TLiteral<"invalid">]>;
|
|
81
81
|
message: Type$1.TString;
|
|
82
82
|
}>;
|
|
83
83
|
};
|
|
@@ -87,7 +87,7 @@ declare const ModelCatalogLoadError$1: {
|
|
|
87
87
|
readonly name: "ModelCatalogLoadError";
|
|
88
88
|
readonly data: {
|
|
89
89
|
path: string;
|
|
90
|
-
reason: "empty" | "invalid" | "
|
|
90
|
+
reason: "empty" | "invalid" | "unreadable";
|
|
91
91
|
message: string;
|
|
92
92
|
};
|
|
93
93
|
schema(): {
|
|
@@ -100,7 +100,7 @@ declare const ModelCatalogLoadError$1: {
|
|
|
100
100
|
};
|
|
101
101
|
readonly data: Type$1.TObject<{
|
|
102
102
|
path: Type$1.TString;
|
|
103
|
-
reason: Type$1.TUnion<[Type$1.TLiteral<"
|
|
103
|
+
reason: Type$1.TUnion<[Type$1.TLiteral<"unreadable">, Type$1.TLiteral<"empty">, Type$1.TLiteral<"invalid">]>;
|
|
104
104
|
message: Type$1.TString;
|
|
105
105
|
}>;
|
|
106
106
|
};
|
|
@@ -109,7 +109,7 @@ declare const ModelCatalogLoadError$1: {
|
|
|
109
109
|
name: "ModelCatalogLoadError";
|
|
110
110
|
data: {
|
|
111
111
|
path: string;
|
|
112
|
-
reason: "empty" | "invalid" | "
|
|
112
|
+
reason: "empty" | "invalid" | "unreadable";
|
|
113
113
|
message: string;
|
|
114
114
|
};
|
|
115
115
|
};
|
|
@@ -436,11 +436,21 @@ declare const filename = "models.gen.json";
|
|
|
436
436
|
*/
|
|
437
437
|
declare function configure(catalogPath: string): void;
|
|
438
438
|
declare function path(): string;
|
|
439
|
+
/**
|
|
440
|
+
* The catalog bundled with aikit for OpenAI, Anthropic and OpenRouter (`aikit modelgen --baseline`),
|
|
441
|
+
* so a first run works before any catalog was generated.
|
|
442
|
+
*/
|
|
443
|
+
declare const baseline: GeneratedCatalog;
|
|
444
|
+
/**
|
|
445
|
+
* The catalog at `catalogPath` over the {@link baseline}: a provider the file lists replaces the
|
|
446
|
+
* bundled one, so a fresh generated catalog wins and an older one still gets the bundled providers.
|
|
447
|
+
* A missing file reads as the baseline alone.
|
|
448
|
+
*/
|
|
439
449
|
declare function load(catalogPath?: string): Promise<GeneratedCatalog>;
|
|
440
450
|
declare const data: LazyGeneratedCatalog;
|
|
441
451
|
declare function get(): Promise<GeneratedCatalog>;
|
|
442
452
|
declare namespace model_d_exports {
|
|
443
|
-
export { APIMetadata, APIMetadataSchema, APIMethodEnum, APIMethodEnumSchema, ActiveThinkingLevel, BuiltInModels, Compatibility, CompatibilitySchema, ExtrasSchema, Info, KnownProviderEnum, KnownProviderEnumSchema, ModelCatalogLoadError, ProviderInfo, ProviderToProtocol, Schema, TModel, ThinkingBudgets, ThinkingLevel, ThinkingLevelEnum, ThinkingLevelMap, ThinkingLevelMapSchema, calculateCost, catalogPath, clampThinkingLevel, configureCatalog, getBuiltInModels, getModel, getModels, getProviders, getSupportedThinkingLevels, isAnthropicAdaptiveThinkingModel, modelsAreEqual, normalizeInput, optionsKey, registry, reloadCatalog, supportsProtocol, thinkingTokenBudgetField };
|
|
453
|
+
export { APIMetadata, APIMetadataSchema, APIMethodEnum, APIMethodEnumSchema, ActiveThinkingLevel, BuiltInModels, Compatibility, CompatibilitySchema, ExtrasSchema, Info, KnownProviderEnum, KnownProviderEnumSchema, ModelCatalogLoadError, ProviderInfo, ProviderToProtocol, Schema, TModel, ThinkingBudgets, ThinkingLevel, ThinkingLevelEnum, ThinkingLevelMap, ThinkingLevelMapSchema, calculateCost, catalogPath, clampThinkingLevel, configureCatalog, effortThinkingLevels, getBuiltInModels, getModel, getModels, getProviders, getSupportedThinkingLevels, isAnthropicAdaptiveThinkingModel, modelsAreEqual, normalizeInput, optionsKey, registry, reloadCatalog, supportsProtocol, thinkingTokenBudgetField };
|
|
444
454
|
}
|
|
445
455
|
declare const KnownProviderEnum: {
|
|
446
456
|
readonly anthropic: "anthropic";
|
|
@@ -459,14 +469,14 @@ type KnownProviderEnum = KnownProviderEnum$1;
|
|
|
459
469
|
declare const ModelCatalogLoadError: {
|
|
460
470
|
new (data: {
|
|
461
471
|
path: string;
|
|
462
|
-
reason: "empty" | "invalid" | "
|
|
472
|
+
reason: "empty" | "invalid" | "unreadable";
|
|
463
473
|
message: string;
|
|
464
474
|
}, options?: ErrorOptions): {
|
|
465
475
|
cause?: unknown;
|
|
466
476
|
readonly name: "ModelCatalogLoadError";
|
|
467
477
|
readonly data: {
|
|
468
478
|
path: string;
|
|
469
|
-
reason: "empty" | "invalid" | "
|
|
479
|
+
reason: "empty" | "invalid" | "unreadable";
|
|
470
480
|
message: string;
|
|
471
481
|
};
|
|
472
482
|
schema(): {
|
|
@@ -479,7 +489,7 @@ declare const ModelCatalogLoadError: {
|
|
|
479
489
|
};
|
|
480
490
|
readonly data: Type$1.TObject<{
|
|
481
491
|
path: Type$1.TString;
|
|
482
|
-
reason: Type$1.TUnion<[Type$1.TLiteral<"
|
|
492
|
+
reason: Type$1.TUnion<[Type$1.TLiteral<"unreadable">, Type$1.TLiteral<"empty">, Type$1.TLiteral<"invalid">]>;
|
|
483
493
|
message: Type$1.TString;
|
|
484
494
|
}>;
|
|
485
495
|
};
|
|
@@ -488,7 +498,7 @@ declare const ModelCatalogLoadError: {
|
|
|
488
498
|
name: "ModelCatalogLoadError";
|
|
489
499
|
data: {
|
|
490
500
|
path: string;
|
|
491
|
-
reason: "empty" | "invalid" | "
|
|
501
|
+
reason: "empty" | "invalid" | "unreadable";
|
|
492
502
|
message: string;
|
|
493
503
|
};
|
|
494
504
|
};
|
|
@@ -510,7 +520,7 @@ declare const ModelCatalogLoadError: {
|
|
|
510
520
|
};
|
|
511
521
|
readonly data: Type$1.TObject<{
|
|
512
522
|
path: Type$1.TString;
|
|
513
|
-
reason: Type$1.TUnion<[Type$1.TLiteral<"
|
|
523
|
+
reason: Type$1.TUnion<[Type$1.TLiteral<"unreadable">, Type$1.TLiteral<"empty">, Type$1.TLiteral<"invalid">]>;
|
|
514
524
|
message: Type$1.TString;
|
|
515
525
|
}>;
|
|
516
526
|
};
|
|
@@ -520,7 +530,7 @@ declare const ModelCatalogLoadError: {
|
|
|
520
530
|
readonly name: "ModelCatalogLoadError";
|
|
521
531
|
readonly data: {
|
|
522
532
|
path: string;
|
|
523
|
-
reason: "empty" | "invalid" | "
|
|
533
|
+
reason: "empty" | "invalid" | "unreadable";
|
|
524
534
|
message: string;
|
|
525
535
|
};
|
|
526
536
|
schema(): {
|
|
@@ -533,7 +543,7 @@ declare const ModelCatalogLoadError: {
|
|
|
533
543
|
};
|
|
534
544
|
readonly data: Type$1.TObject<{
|
|
535
545
|
path: Type$1.TString;
|
|
536
|
-
reason: Type$1.TUnion<[Type$1.TLiteral<"
|
|
546
|
+
reason: Type$1.TUnion<[Type$1.TLiteral<"unreadable">, Type$1.TLiteral<"empty">, Type$1.TLiteral<"invalid">]>;
|
|
537
547
|
message: Type$1.TString;
|
|
538
548
|
}>;
|
|
539
549
|
};
|
|
@@ -542,7 +552,7 @@ declare const ModelCatalogLoadError: {
|
|
|
542
552
|
name: "ModelCatalogLoadError";
|
|
543
553
|
data: {
|
|
544
554
|
path: string;
|
|
545
|
-
reason: "empty" | "invalid" | "
|
|
555
|
+
reason: "empty" | "invalid" | "unreadable";
|
|
546
556
|
message: string;
|
|
547
557
|
};
|
|
548
558
|
};
|
|
@@ -918,6 +928,12 @@ declare const ThinkingLevelMapSchema: Type$1.TObject<{
|
|
|
918
928
|
xhigh: Type$1.TOptional<Type$1.TUnion<[Type$1.TString, Type$1.TNull]>>;
|
|
919
929
|
}>;
|
|
920
930
|
type ThinkingLevelMap = Static<typeof ThinkingLevelMapSchema>;
|
|
931
|
+
/**
|
|
932
|
+
* The level map for a model that lists the reasoning efforts it accepts (models.dev
|
|
933
|
+
* `reasoning_options`, OpenRouter `supported_efforts`): a level maps to itself only when listed,
|
|
934
|
+
* and off maps to `none` only when `none` is listed (pi). Undefined when nothing usable is listed.
|
|
935
|
+
*/
|
|
936
|
+
declare function effortThinkingLevels(efforts: ReadonlyArray<string | null>): ThinkingLevelMap | undefined;
|
|
921
937
|
declare const CompatibilitySchema: Type$1.TObject<{
|
|
922
938
|
/** The Google protocol accepts thinking levels rather than a token budget. */
|
|
923
939
|
supportsThinkingLevel: Type$1.TOptional<Type$1.TBoolean>;
|
|
@@ -929,6 +945,8 @@ declare const CompatibilitySchema: Type$1.TObject<{
|
|
|
929
945
|
supportsThinkingTokenBudget: Type$1.TOptional<Type$1.TBoolean>;
|
|
930
946
|
/** Claude model that sizes its own thinking, driven by `effort` instead of a token budget. */
|
|
931
947
|
forceAdaptiveThinking: Type$1.TOptional<Type$1.TBoolean>;
|
|
948
|
+
/** False for a model that rejects a `temperature` field; the request then leaves it out. */
|
|
949
|
+
supportsTemperature: Type$1.TOptional<Type$1.TBoolean>;
|
|
932
950
|
/** Name of that field, when it is not the conventional `thinking_token_budget`. */
|
|
933
951
|
thinkingTokenBudgetField: Type$1.TOptional<Type$1.TString>;
|
|
934
952
|
}>;
|
|
@@ -1011,6 +1029,8 @@ declare const Schema: Type$1.TObject<{
|
|
|
1011
1029
|
supportsThinkingTokenBudget: Type$1.TOptional<Type$1.TBoolean>;
|
|
1012
1030
|
/** Claude model that sizes its own thinking, driven by `effort` instead of a token budget. */
|
|
1013
1031
|
forceAdaptiveThinking: Type$1.TOptional<Type$1.TBoolean>;
|
|
1032
|
+
/** False for a model that rejects a `temperature` field; the request then leaves it out. */
|
|
1033
|
+
supportsTemperature: Type$1.TOptional<Type$1.TBoolean>;
|
|
1014
1034
|
/** Name of that field, when it is not the conventional `thinking_token_budget`. */
|
|
1015
1035
|
thinkingTokenBudgetField: Type$1.TOptional<Type$1.TString>;
|
|
1016
1036
|
}>>;
|
|
@@ -1047,6 +1067,8 @@ declare const Info: Type$1.TObject<{
|
|
|
1047
1067
|
supportsThinkingTokenBudget: Type$1.TOptional<Type$1.TBoolean>;
|
|
1048
1068
|
/** Claude model that sizes its own thinking, driven by `effort` instead of a token budget. */
|
|
1049
1069
|
forceAdaptiveThinking: Type$1.TOptional<Type$1.TBoolean>;
|
|
1070
|
+
/** False for a model that rejects a `temperature` field; the request then leaves it out. */
|
|
1071
|
+
supportsTemperature: Type$1.TOptional<Type$1.TBoolean>;
|
|
1050
1072
|
/** Name of that field, when it is not the conventional `thinking_token_budget`. */
|
|
1051
1073
|
thinkingTokenBudgetField: Type$1.TOptional<Type$1.TString>;
|
|
1052
1074
|
}>>;
|
|
@@ -1157,6 +1179,7 @@ declare const registry: {
|
|
|
1157
1179
|
supportsOpenAIGrammarTools?: boolean;
|
|
1158
1180
|
supportsThinkingTokenBudget?: boolean;
|
|
1159
1181
|
forceAdaptiveThinking?: boolean;
|
|
1182
|
+
supportsTemperature?: boolean;
|
|
1160
1183
|
thinkingTokenBudgetField?: string;
|
|
1161
1184
|
};
|
|
1162
1185
|
contextWindow: number;
|
|
@@ -1255,4 +1278,4 @@ declare function getSupportedThinkingLevels<TProtocol extends KnownProviderEnum>
|
|
|
1255
1278
|
declare function clampThinkingLevel<TProtocol extends KnownProviderEnum>(model: TModel<TProtocol>, level: ThinkingLevel): ThinkingLevel;
|
|
1256
1279
|
//#endregion
|
|
1257
1280
|
export { ProviderToProtocol as a, getModel as c, model_d_exports as d, modelsAreEqual as f, KnownProviderEnum as i, getModels as l, ActiveThinkingLevel as n, TModel as o, registry as p, Info as r, ThinkingBudgets as s, APIMethodEnum as t, getProviders as u };
|
|
1258
|
-
//# sourceMappingURL=model-
|
|
1281
|
+
//# sourceMappingURL=model-D3wc9-u4.d.mts.map
|