@cerebriline/llms 0.0.0-stage → 4.100.241

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.
Files changed (204) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +15 -2
  3. package/dist/catalog/catalog-cline-recommended.d.ts +14 -0
  4. package/dist/catalog/catalog-cline-recommended.d.ts.map +1 -0
  5. package/dist/catalog/catalog-live.d.ts +64 -0
  6. package/dist/catalog/catalog-live.d.ts.map +1 -0
  7. package/dist/catalog/catalog.generated-access.d.ts +5 -0
  8. package/dist/catalog/catalog.generated-access.d.ts.map +1 -0
  9. package/dist/catalog/catalog.generated.d.ts +17 -0
  10. package/dist/catalog/catalog.generated.d.ts.map +1 -0
  11. package/dist/catalog/model-filters.d.ts +9 -0
  12. package/dist/catalog/model-filters.d.ts.map +1 -0
  13. package/dist/catalog/model-id-aliases.d.ts +11 -0
  14. package/dist/catalog/model-id-aliases.d.ts.map +1 -0
  15. package/dist/catalog/model-operation.d.ts +27 -0
  16. package/dist/catalog/model-operation.d.ts.map +1 -0
  17. package/dist/catalog/types.d.ts +367 -0
  18. package/dist/catalog/types.d.ts.map +1 -0
  19. package/dist/index.browser.d.ts +12 -0
  20. package/dist/index.browser.d.ts.map +1 -0
  21. package/dist/index.browser.js +16 -0
  22. package/dist/index.d.ts +30 -0
  23. package/dist/index.d.ts.map +1 -0
  24. package/dist/index.js +272 -0
  25. package/dist/models.d.ts +10 -0
  26. package/dist/models.d.ts.map +1 -0
  27. package/dist/models.js +241 -0
  28. package/dist/providers/agent-slots.d.ts +100 -0
  29. package/dist/providers/agent-slots.d.ts.map +1 -0
  30. package/dist/providers/ai-sdk.d.ts +158 -0
  31. package/dist/providers/ai-sdk.d.ts.map +1 -0
  32. package/dist/providers/async.d.ts +2 -0
  33. package/dist/providers/async.d.ts.map +1 -0
  34. package/dist/providers/billing.d.ts +5 -0
  35. package/dist/providers/billing.d.ts.map +1 -0
  36. package/dist/providers/builtin-types.d.ts +34 -0
  37. package/dist/providers/builtin-types.d.ts.map +1 -0
  38. package/dist/providers/builtins-runtime.d.ts +3 -0
  39. package/dist/providers/builtins-runtime.d.ts.map +1 -0
  40. package/dist/providers/builtins.d.ts +30 -0
  41. package/dist/providers/builtins.d.ts.map +1 -0
  42. package/dist/providers/compat.d.ts +75 -0
  43. package/dist/providers/compat.d.ts.map +1 -0
  44. package/dist/providers/config.d.ts +521 -0
  45. package/dist/providers/config.d.ts.map +1 -0
  46. package/dist/providers/error-classification.d.ts +23 -0
  47. package/dist/providers/error-classification.d.ts.map +1 -0
  48. package/dist/providers/errors.d.ts +33 -0
  49. package/dist/providers/errors.d.ts.map +1 -0
  50. package/dist/providers/factory-registry.d.ts +92 -0
  51. package/dist/providers/factory-registry.d.ts.map +1 -0
  52. package/dist/providers/format.d.ts +2 -0
  53. package/dist/providers/format.d.ts.map +1 -0
  54. package/dist/providers/gateway.d.ts +123 -0
  55. package/dist/providers/gateway.d.ts.map +1 -0
  56. package/dist/providers/handler.d.ts +75 -0
  57. package/dist/providers/handler.d.ts.map +1 -0
  58. package/dist/providers/http.d.ts +10 -0
  59. package/dist/providers/http.d.ts.map +1 -0
  60. package/dist/providers/ids.d.ts +77 -0
  61. package/dist/providers/ids.d.ts.map +1 -0
  62. package/dist/providers/messages.d.ts +5 -0
  63. package/dist/providers/messages.d.ts.map +1 -0
  64. package/dist/providers/middleware/backoff.d.ts +11 -0
  65. package/dist/providers/middleware/backoff.d.ts.map +1 -0
  66. package/dist/providers/middleware/retry-empty-response.d.ts +74 -0
  67. package/dist/providers/middleware/retry-empty-response.d.ts.map +1 -0
  68. package/dist/providers/middleware/retry-rate-limit.d.ts +49 -0
  69. package/dist/providers/middleware/retry-rate-limit.d.ts.map +1 -0
  70. package/dist/providers/middleware/split-tool-images.d.ts +32 -0
  71. package/dist/providers/middleware/split-tool-images.d.ts.map +1 -0
  72. package/dist/providers/middleware/stream-part-classification.d.ts +33 -0
  73. package/dist/providers/middleware/stream-part-classification.d.ts.map +1 -0
  74. package/dist/providers/model-capabilities.d.ts +15 -0
  75. package/dist/providers/model-capabilities.d.ts.map +1 -0
  76. package/dist/providers/model-facts.d.ts +115 -0
  77. package/dist/providers/model-facts.d.ts.map +1 -0
  78. package/dist/providers/model-operations.d.ts +78 -0
  79. package/dist/providers/model-operations.d.ts.map +1 -0
  80. package/dist/providers/model-registry.d.ts +25 -0
  81. package/dist/providers/model-registry.d.ts.map +1 -0
  82. package/dist/providers/model-tools.d.ts +22 -0
  83. package/dist/providers/model-tools.d.ts.map +1 -0
  84. package/dist/providers/openai-codex-models.d.ts +11 -0
  85. package/dist/providers/openai-codex-models.d.ts.map +1 -0
  86. package/dist/providers/provider-ids.generated.d.ts +13 -0
  87. package/dist/providers/provider-ids.generated.d.ts.map +1 -0
  88. package/dist/providers/provider-keys.d.ts +13 -0
  89. package/dist/providers/provider-keys.d.ts.map +1 -0
  90. package/dist/providers/provider-request-capture.d.ts +10 -0
  91. package/dist/providers/provider-request-capture.d.ts.map +1 -0
  92. package/dist/providers/providers.generated.d.ts +19 -0
  93. package/dist/providers/providers.generated.d.ts.map +1 -0
  94. package/dist/providers/reasoning-history.d.ts +140 -0
  95. package/dist/providers/reasoning-history.d.ts.map +1 -0
  96. package/dist/providers/registry.d.ts +19 -0
  97. package/dist/providers/registry.d.ts.map +1 -0
  98. package/dist/providers/request-headers.d.ts +30 -0
  99. package/dist/providers/request-headers.d.ts.map +1 -0
  100. package/dist/providers/request-timings.d.ts +20 -0
  101. package/dist/providers/request-timings.d.ts.map +1 -0
  102. package/dist/providers/routing/anthropic-compatible.d.ts +35 -0
  103. package/dist/providers/routing/anthropic-compatible.d.ts.map +1 -0
  104. package/dist/providers/routing/bedrock-cache-point.d.ts +26 -0
  105. package/dist/providers/routing/bedrock-cache-point.d.ts.map +1 -0
  106. package/dist/providers/routing/generic-compatible.d.ts +10 -0
  107. package/dist/providers/routing/generic-compatible.d.ts.map +1 -0
  108. package/dist/providers/routing/glm-thinking.d.ts +16 -0
  109. package/dist/providers/routing/glm-thinking.d.ts.map +1 -0
  110. package/dist/providers/routing/minimax-thinking.d.ts +6 -0
  111. package/dist/providers/routing/minimax-thinking.d.ts.map +1 -0
  112. package/dist/providers/routing/portable-reasoning.d.ts +11 -0
  113. package/dist/providers/routing/portable-reasoning.d.ts.map +1 -0
  114. package/dist/providers/routing/provider-option-rules.d.ts +13 -0
  115. package/dist/providers/routing/provider-option-rules.d.ts.map +1 -0
  116. package/dist/providers/routing/provider-options-types.d.ts +57 -0
  117. package/dist/providers/routing/provider-options-types.d.ts.map +1 -0
  118. package/dist/providers/routing/provider-options.d.ts +27 -0
  119. package/dist/providers/routing/provider-options.d.ts.map +1 -0
  120. package/dist/providers/routing/reasoning-codecs.d.ts +4 -0
  121. package/dist/providers/routing/reasoning-codecs.d.ts.map +1 -0
  122. package/dist/providers/routing/reasoning-options.d.ts +8 -0
  123. package/dist/providers/routing/reasoning-options.d.ts.map +1 -0
  124. package/dist/providers/routing/utils.d.ts +31 -0
  125. package/dist/providers/routing/utils.d.ts.map +1 -0
  126. package/dist/providers/sdk-warnings.d.ts +14 -0
  127. package/dist/providers/sdk-warnings.d.ts.map +1 -0
  128. package/dist/providers/server-health.d.ts +66 -0
  129. package/dist/providers/server-health.d.ts.map +1 -0
  130. package/dist/providers/stream.d.ts +124 -0
  131. package/dist/providers/stream.d.ts.map +1 -0
  132. package/dist/providers/types.d.ts +10 -0
  133. package/dist/providers/types.d.ts.map +1 -0
  134. package/dist/providers/url.d.ts +3 -0
  135. package/dist/providers/url.d.ts.map +1 -0
  136. package/dist/providers/utils.d.ts +2 -0
  137. package/dist/providers/utils.d.ts.map +1 -0
  138. package/dist/providers/vendors/anthropic.d.ts +4 -0
  139. package/dist/providers/vendors/anthropic.d.ts.map +1 -0
  140. package/dist/providers/vendors/bedrock.d.ts +24 -0
  141. package/dist/providers/vendors/bedrock.d.ts.map +1 -0
  142. package/dist/providers/vendors/cline.d.ts +37 -0
  143. package/dist/providers/vendors/cline.d.ts.map +1 -0
  144. package/dist/providers/vendors/community.d.ts +8 -0
  145. package/dist/providers/vendors/community.d.ts.map +1 -0
  146. package/dist/providers/vendors/google.d.ts +12 -0
  147. package/dist/providers/vendors/google.d.ts.map +1 -0
  148. package/dist/providers/vendors/llamacpp-sampling.d.ts +130 -0
  149. package/dist/providers/vendors/llamacpp-sampling.d.ts.map +1 -0
  150. package/dist/providers/vendors/llamacpp-timings.d.ts +33 -0
  151. package/dist/providers/vendors/llamacpp-timings.d.ts.map +1 -0
  152. package/dist/providers/vendors/minimax-thinking.d.ts +5 -0
  153. package/dist/providers/vendors/minimax-thinking.d.ts.map +1 -0
  154. package/dist/providers/vendors/mistral.d.ts +4 -0
  155. package/dist/providers/vendors/mistral.d.ts.map +1 -0
  156. package/dist/providers/vendors/ollama-account.d.ts +128 -0
  157. package/dist/providers/vendors/ollama-account.d.ts.map +1 -0
  158. package/dist/providers/vendors/ollama-reachability.d.ts +42 -0
  159. package/dist/providers/vendors/ollama-reachability.d.ts.map +1 -0
  160. package/dist/providers/vendors/ollama-stall-watchdog.d.ts +86 -0
  161. package/dist/providers/vendors/ollama-stall-watchdog.d.ts.map +1 -0
  162. package/dist/providers/vendors/ollama-tool-images.d.ts +67 -0
  163. package/dist/providers/vendors/ollama-tool-images.d.ts.map +1 -0
  164. package/dist/providers/vendors/ollama.d.ts +256 -0
  165. package/dist/providers/vendors/ollama.d.ts.map +1 -0
  166. package/dist/providers/vendors/openai-compatible.d.ts +16 -0
  167. package/dist/providers/vendors/openai-compatible.d.ts.map +1 -0
  168. package/dist/providers/vendors/openai.d.ts +4 -0
  169. package/dist/providers/vendors/openai.d.ts.map +1 -0
  170. package/dist/providers/vendors/opencoti-agent-window.d.ts +44 -0
  171. package/dist/providers/vendors/opencoti-agent-window.d.ts.map +1 -0
  172. package/dist/providers/vendors/opencoti-kv-pressure.d.ts +322 -0
  173. package/dist/providers/vendors/opencoti-kv-pressure.d.ts.map +1 -0
  174. package/dist/providers/vendors/opencoti-liveness.d.ts +177 -0
  175. package/dist/providers/vendors/opencoti-liveness.d.ts.map +1 -0
  176. package/dist/providers/vendors/opencoti-window.d.ts +56 -0
  177. package/dist/providers/vendors/opencoti-window.d.ts.map +1 -0
  178. package/dist/providers/vendors/opencoti.d.ts +335 -0
  179. package/dist/providers/vendors/opencoti.d.ts.map +1 -0
  180. package/dist/providers/vendors/polykv-lead.d.ts +94 -0
  181. package/dist/providers/vendors/polykv-lead.d.ts.map +1 -0
  182. package/dist/providers/vendors/polykv-swarm.d.ts +705 -0
  183. package/dist/providers/vendors/polykv-swarm.d.ts.map +1 -0
  184. package/dist/providers/vendors/polykv.d.ts +958 -0
  185. package/dist/providers/vendors/polykv.d.ts.map +1 -0
  186. package/dist/providers/vendors/types.d.ts +176 -0
  187. package/dist/providers/vendors/types.d.ts.map +1 -0
  188. package/dist/providers/vendors/vertex.d.ts +4 -0
  189. package/dist/providers/vendors/vertex.d.ts.map +1 -0
  190. package/dist/providers/vendors/xollama-engine.d.ts +57 -0
  191. package/dist/providers/vendors/xollama-engine.d.ts.map +1 -0
  192. package/dist/providers/vendors/xollama.d.ts +188 -0
  193. package/dist/providers/vendors/xollama.d.ts.map +1 -0
  194. package/dist/providers.browser.d.ts +3 -0
  195. package/dist/providers.browser.d.ts.map +1 -0
  196. package/dist/providers.browser.js +16 -0
  197. package/dist/providers.d.ts +12 -0
  198. package/dist/providers.d.ts.map +1 -0
  199. package/dist/providers.js +272 -0
  200. package/dist/services/langfuse-telemetry.d.ts +19 -0
  201. package/dist/services/langfuse-telemetry.d.ts.map +1 -0
  202. package/dist/transcription.d.ts +53 -0
  203. package/dist/transcription.d.ts.map +1 -0
  204. package/package.json +84 -5
@@ -0,0 +1,15 @@
1
+ import type { GatewayModelCapability, ModelInfo } from "@cerebriline/shared";
2
+ /**
3
+ * Translates catalog capabilities into gateway capabilities.
4
+ *
5
+ * Every gateway model accepts text, so `"text"` is always present and leads
6
+ * the result. Capabilities outside `ModelCapabilitySchema` reach this function
7
+ * from dynamic provider listings typed as plain strings; they contribute only
8
+ * the implied text capability rather than being passed through unvalidated.
9
+ *
10
+ * A missing or empty list yields `undefined`, matching `modelHasCapability`'s
11
+ * treatment of both as "no capability signal" so downstream gates apply their
12
+ * own defaults instead of reading an authoritative denial.
13
+ */
14
+ export declare function toGatewayModelCapabilities(capabilities: ModelInfo["capabilities"] | readonly string[] | undefined): GatewayModelCapability[] | undefined;
15
+ //# sourceMappingURL=model-capabilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-capabilities.d.ts","sourceRoot":"","sources":["../../src/providers/model-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,sBAAsB,EAEtB,SAAS,EACT,MAAM,eAAe,CAAC;AAiCvB;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CACzC,YAAY,EAAE,SAAS,CAAC,cAAc,CAAC,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,GACrE,sBAAsB,EAAE,GAAG,SAAS,CActC"}
@@ -0,0 +1,115 @@
1
+ import type { GatewayModelRoute, GatewayProviderContext, GatewayReasoningFormat, GatewayStreamRequest, ModelOperation, ModelReasoningOption, ReasoningEffort, ReasoningHistoryPlan, ReasoningHistorySetting } from "@cerebriline/shared";
2
+ interface ModelReasoningControls {
3
+ effort?: Extract<ModelReasoningOption, {
4
+ type: "effort";
5
+ }>;
6
+ budget?: Extract<ModelReasoningOption, {
7
+ type: "budget_tokens";
8
+ }>;
9
+ toggle: boolean;
10
+ efforts: ReasoningEffort[];
11
+ supportsOff: boolean;
12
+ supportsDefault: boolean;
13
+ }
14
+ export declare function getModelReasoningControls(options: readonly ModelReasoningOption[] | undefined): ModelReasoningControls | undefined;
15
+ export declare function normalizeReasoningEffort(effort: ReasoningEffort, supportedEfforts: readonly ReasoningEffort[]): ReasoningEffort | undefined;
16
+ export declare function resolveModelFamily(context: GatewayProviderContext): string | undefined;
17
+ export declare function normalizeRoutingValue(value: string | undefined): string | undefined;
18
+ export declare function isAnthropicCompatibleModel(options: {
19
+ modelId?: string;
20
+ family?: string;
21
+ }): boolean;
22
+ export declare function isAnthropicCompatibleModelId(modelId: string | undefined): boolean;
23
+ export declare function isClaudeModelId(modelId: string | undefined): boolean;
24
+ export declare function isClaudeFableModelId(modelId: string | undefined): boolean;
25
+ /**
26
+ * Wire-shape era of a Claude model id, used only as a fallback when catalog
27
+ * `reasoningOptions` metadata is unavailable (offline baked catalog,
28
+ * user-typed unlisted ids such as "claude-opus-4-6:1m").
29
+ *
30
+ * - "adaptive": 4.6+/5.x models; the Anthropic API rejects the manual
31
+ * `thinking: {type: "enabled", budgetTokens}` shape for these.
32
+ * - "legacy": known pre-4.6 families that require the manual shape.
33
+ * - "unknown-claude": a Claude id the version parser does not recognize.
34
+ * Callers should treat these as NEWER than the known list and prefer
35
+ * adaptive — the forward-compatible policy the ecosystem converged on
36
+ * (vercel/ai#17804 for @ai-sdk/anthropic's capability lookup; opencode's
37
+ * transform.ts after repeated allowlist misses for opus-4.7, sonnet-5,
38
+ * and opus-5). New Claude releases reject the manual shape, so an
39
+ * allowlist that lags a release turns every reasoning request into a
40
+ * hard API error.
41
+ * - "not-claude": non-Claude ids (including Anthropic-compatible aliases)
42
+ * stay conservative for third-party endpoints.
43
+ */
44
+ export type ClaudeThinkingEra = "adaptive" | "legacy" | "unknown-claude" | "not-claude";
45
+ export declare function resolveClaudeThinkingEra(modelId: string | undefined): ClaudeThinkingEra;
46
+ export declare function isQwenModel(options: {
47
+ modelId?: string;
48
+ family?: string;
49
+ }): boolean;
50
+ export declare function isOpenAIReasoningEraModelId(modelId: string | undefined): boolean;
51
+ export declare function resolveGeminiThinkingMode(input: {
52
+ request: Pick<GatewayStreamRequest, "modelId">;
53
+ context: GatewayProviderContext;
54
+ }): "level" | "budget" | undefined;
55
+ export declare function modelRouteMatches(route: GatewayModelRoute, options: {
56
+ modelId?: string;
57
+ family?: string;
58
+ capabilities?: readonly string[];
59
+ operation?: ModelOperation;
60
+ modalities?: import("@cerebriline/shared").ModelModalities;
61
+ }): boolean;
62
+ export declare function providerReasoningRouteMatches(format: GatewayReasoningFormat, request: Pick<GatewayStreamRequest, "modelId">, context: GatewayProviderContext): boolean;
63
+ export declare function isGlmModel(request: Pick<GatewayStreamRequest, "modelId">, context: GatewayProviderContext): boolean;
64
+ export declare function isMiniMaxM3Model(request: Pick<GatewayStreamRequest, "modelId">, _context: GatewayProviderContext): boolean;
65
+ export declare function isKimiK26Family(context: GatewayProviderContext): boolean;
66
+ export declare function isMoonshotKimiModelIdFallback(request: Pick<GatewayStreamRequest, "modelId">): boolean;
67
+ export declare function isDeepSeekFamily(context: GatewayProviderContext): boolean;
68
+ /**
69
+ * Whether the resolved model advertises image input (`"images"` in its
70
+ * gateway capabilities). Models with no capability data at all (e.g. ids
71
+ * resolved outside any catalog) fail open: images are kept rather than
72
+ * hidden from a possibly capable model.
73
+ */
74
+ export declare function modelSupportsImageInput(context: GatewayProviderContext): boolean;
75
+ export declare function getReasoningDefaultOnMetadata(context: GatewayProviderContext): boolean | undefined;
76
+ export declare function isOllamaQwen3ModelIdFallback(request: Pick<GatewayStreamRequest, "providerId" | "modelId">): boolean;
77
+ export declare function isCerebrasProvider(request: Pick<GatewayStreamRequest, "providerId">, context: GatewayProviderContext): boolean;
78
+ /**
79
+ * Whether this request is going to an Ollama server.
80
+ *
81
+ * Checks the same three identifiers as {@link isCerebrasProvider}: a provider
82
+ * can be named at the request, at the resolved config, or by the manifest, and
83
+ * a custom entry pointed at a local Ollama carries the name in only one of
84
+ * them.
85
+ */
86
+ export declare function isOllamaProvider(request: Pick<GatewayStreamRequest, "providerId">, context: GatewayProviderContext): boolean;
87
+ export declare function modelReasoningDefaultsOn(options: {
88
+ request: Pick<GatewayStreamRequest, "providerId" | "modelId">;
89
+ context: GatewayProviderContext;
90
+ }): boolean;
91
+ export type ReasoningHistoryMode = "all" | "last" | "none";
92
+ export interface ReasoningHistoryProviderConfig {
93
+ modelId?: string;
94
+ baseUrl?: string;
95
+ reasoningHistory?: ReasoningHistorySetting;
96
+ /**
97
+ * Whether `auto` may fall back to inlining the block into content when the
98
+ * server's template renders none of the reasoning field. On unless an
99
+ * operator turns it off.
100
+ */
101
+ reasoningInline?: boolean;
102
+ }
103
+ export declare function reasoningHistoryModeForProvider(providerId: string | undefined, config?: ReasoningHistoryProviderConfig): ReasoningHistoryMode;
104
+ /**
105
+ * The same answer, with the route as well as the amount.
106
+ *
107
+ * Both callers exist: the compaction pipeline needs only the scope, because
108
+ * both routes put the same characters on the wire, and the request path needs
109
+ * the route, because it is the one building the message.
110
+ */
111
+ export declare function reasoningHistoryPlanForProvider(providerId: string | undefined, config?: ReasoningHistoryProviderConfig): ReasoningHistoryPlan;
112
+ export declare function resolveReasoningHistoryMode(request: GatewayStreamRequest, context: GatewayProviderContext): ReasoningHistoryMode;
113
+ export declare function resolveReasoningHistoryPlanForRequest(request: GatewayStreamRequest, context: GatewayProviderContext): ReasoningHistoryPlan;
114
+ export {};
115
+ //# sourceMappingURL=model-facts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-facts.d.ts","sourceRoot":"","sources":["../../src/providers/model-facts.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,78 @@
1
+ import type { GatewayModelDefinition, GatewayModelOperationCapability, GatewayProviderManifest, ModelModalities, ModelOperation, ModelOperationMode } from "@cerebriline/shared";
2
+ export declare const BUILTIN_TRANSCRIPTION_TRANSPORTS: {
3
+ readonly "openai-native": {
4
+ readonly transport: "openai-compatible";
5
+ readonly modes: readonly ["batch"];
6
+ };
7
+ readonly "vercel-ai-gateway": {
8
+ readonly transport: "vercel-ai-gateway";
9
+ readonly modes: readonly ["batch", "streaming"];
10
+ };
11
+ readonly elevenlabs: {
12
+ readonly transport: "elevenlabs";
13
+ readonly modes: readonly ["batch"];
14
+ };
15
+ readonly evroc: {
16
+ readonly transport: "openai-compatible";
17
+ readonly modes: readonly ["batch"];
18
+ };
19
+ readonly groq: {
20
+ readonly transport: "openai-compatible";
21
+ readonly modes: readonly ["batch"];
22
+ };
23
+ readonly mistral: {
24
+ readonly transport: "openai-compatible";
25
+ readonly modes: readonly ["batch"];
26
+ };
27
+ readonly nearai: {
28
+ readonly transport: "openai-compatible";
29
+ readonly modes: readonly ["batch"];
30
+ };
31
+ readonly "privatemode-ai": {
32
+ readonly transport: "openai-compatible";
33
+ readonly modes: readonly ["batch"];
34
+ };
35
+ readonly scaleway: {
36
+ readonly transport: "openai-compatible";
37
+ readonly modes: readonly ["batch"];
38
+ };
39
+ };
40
+ /**
41
+ * Executable operation declarations keyed by provider ID.
42
+ *
43
+ * Transcription capabilities are derived from the transport declaration so a
44
+ * provider cannot accidentally advertise models without a matching executor,
45
+ * or register an executor that the catalog filters out.
46
+ */
47
+ export declare const BUILTIN_MODEL_OPERATION_CAPABILITIES: Readonly<Record<string, readonly GatewayModelOperationCapability[]>>;
48
+ export declare function resolveModelOperation(model: {
49
+ operation?: ModelOperation;
50
+ }): ModelOperation;
51
+ /**
52
+ * Constrain external catalog facts to the modalities implemented by the
53
+ * selected built-in transport. Catalogs may advertise additional endpoint
54
+ * features (for example PDF output on an image model) that the SDK does not
55
+ * request or decode. The stored model must describe the executable subset.
56
+ */
57
+ export declare function normalizeBuiltinModelOperationModalities(input: {
58
+ providerId: string;
59
+ modelId: string;
60
+ operation?: ModelOperation;
61
+ operationModes?: readonly ModelOperationMode[];
62
+ modalities?: ModelModalities;
63
+ family?: string;
64
+ capabilities?: readonly string[];
65
+ }): ModelModalities | undefined;
66
+ /** Resolve a model operation directly from a provider manifest. */
67
+ export declare function providerManifestSupportsModelOperation(manifest: Pick<GatewayProviderManifest, "modelOperationCapabilities" | "models">, model: Pick<GatewayModelDefinition, "id" | "operation" | "operationModes" | "modalities" | "capabilities" | "metadata">): boolean;
68
+ /** Catalog-time form of the same fail-closed transport capability check. */
69
+ export declare function builtinProviderSupportsModelOperation(input: {
70
+ providerId: string;
71
+ modelId: string;
72
+ operation?: ModelOperation;
73
+ operationModes?: readonly ModelOperationMode[];
74
+ modalities?: ModelModalities;
75
+ family?: string;
76
+ capabilities?: readonly string[];
77
+ }): boolean;
78
+ //# sourceMappingURL=model-operations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-operations.d.ts","sourceRoot":"","sources":["../../src/providers/model-operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,sBAAsB,EACtB,+BAA+B,EAC/B,uBAAuB,EAEvB,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,MAAM,eAAe,CAAC;AAmBvB,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmB+B,CAAC;AAyB7E;;;;;;GAMG;AACH,eAAO,MAAM,oCAAoC,EAAE,QAAQ,CAC1D,MAAM,CAAC,MAAM,EAAE,SAAS,+BAA+B,EAAE,CAAC,CA8B1D,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IAC5C,SAAS,CAAC,EAAE,cAAc,CAAC;CAC3B,GAAG,cAAc,CAEjB;AAsFD;;;;;GAKG;AACH,wBAAgB,wCAAwC,CAAC,KAAK,EAAE;IAC/D,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,cAAc,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAC/C,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC,GAAG,eAAe,GAAG,SAAS,CAyC9B;AAED,mEAAmE;AACnE,wBAAgB,sCAAsC,CACrD,QAAQ,EAAE,IAAI,CACb,uBAAuB,EACvB,4BAA4B,GAAG,QAAQ,CACvC,EACD,KAAK,EAAE,IAAI,CACV,sBAAsB,EACpB,IAAI,GACJ,WAAW,GACX,gBAAgB,GAChB,YAAY,GACZ,cAAc,GACd,UAAU,CACZ,GACC,OAAO,CAKT;AAED,4EAA4E;AAC5E,wBAAgB,qCAAqC,CAAC,KAAK,EAAE;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,cAAc,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAC/C,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC,GAAG,OAAO,CAUV"}
@@ -0,0 +1,25 @@
1
+ import type { ModelCollection, ModelInfo, ProviderInfo } from "../catalog/types";
2
+ export type ProviderModelFilter = "chat";
3
+ export interface GetModelsForProviderOptions {
4
+ filter?: ProviderModelFilter;
5
+ }
6
+ export declare function getProviderIds(): string[];
7
+ export declare function hasProvider(providerId: string): boolean;
8
+ export declare function getProvider(providerId: string): Promise<ProviderInfo | undefined>;
9
+ export declare function getProviderCollectionSync(providerId: string): ModelCollection | undefined;
10
+ export declare function getProviderCollection(providerId: string): Promise<ModelCollection | undefined>;
11
+ export declare function getModelsForProvider(providerId: string, options?: GetModelsForProviderOptions): Promise<Record<string, ModelInfo>>;
12
+ /**
13
+ * Returns only models explicitly registered at runtime, excluding the bundled
14
+ * provider collection. These overrides must remain highest-precedence when a
15
+ * caller merges the registry with a freshly fetched catalog.
16
+ */
17
+ export declare function getModelOverridesForProvider(providerId: string): Promise<Record<string, ModelInfo>>;
18
+ export declare function getAllProviders(): Promise<ProviderInfo[]>;
19
+ export declare function registerProvider(collection: ModelCollection): void;
20
+ export declare function registerModel(providerId: string, modelId: string, info: ModelInfo): void;
21
+ export declare function unregisterModel(providerId: string, modelId: string): boolean;
22
+ export declare function unregisterProvider(providerId: string): boolean;
23
+ export declare function resetRegistry(): void;
24
+ export declare const MODEL_COLLECTIONS_BY_PROVIDER_ID: Record<string, ModelCollection>;
25
+ //# sourceMappingURL=model-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-registry.d.ts","sourceRoot":"","sources":["../../src/providers/model-registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,eAAe,EACf,SAAS,EACT,YAAY,EACZ,MAAM,kBAAkB,CAAC;AAG1B,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAEzC,MAAM,WAAW,2BAA2B;IAC3C,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC7B;AA8BD,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAMzC;AAED,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,wBAAsB,WAAW,CAChC,UAAU,EAAE,MAAM,GAChB,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAEnC;AAED,wBAAgB,yBAAyB,CACxC,UAAU,EAAE,MAAM,GAChB,eAAe,GAAG,SAAS,CAE7B;AAED,wBAAsB,qBAAqB,CAC1C,UAAU,EAAE,MAAM,GAChB,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC,CAEtC;AAED,wBAAsB,oBAAoB,CACzC,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,2BAAgC,GACvC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAepC;AAED;;;;GAIG;AACH,wBAAsB,4BAA4B,CACjD,UAAU,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAMpC;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAI/D;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,eAAe,GAAG,IAAI,CAElE;AAED,wBAAgB,aAAa,CAC5B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,SAAS,GACb,IAAI,CAKN;AAED,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAE5E;AAED,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAG9D;AAED,wBAAgB,aAAa,IAAI,IAAI,CAGpC;AAGD,eAAO,MAAM,gCAAgC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAgB1E,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { GatewayProviderManifest, ModelToolName } from "@cerebriline/shared";
2
+ export interface ModelToolSupportInput {
3
+ providerId: string;
4
+ modelId?: string;
5
+ }
6
+ /** Resolve a model-tool capability directly from a provider manifest. */
7
+ export declare function providerManifestSupportsModelTool(manifest: GatewayProviderManifest, modelId: string | undefined, toolName: ModelToolName): boolean;
8
+ /**
9
+ * Resolve stable native model-tool support for a configured Cline provider.
10
+ * This intentionally describes provider execution support, not ordinary
11
+ * function/tool calling support. Builtin specs are the source of truth; vendor
12
+ * modules only translate supported portable tools into AI SDK tool objects.
13
+ */
14
+ export declare function supportsModelTool(input: ModelToolSupportInput, toolName: ModelToolName): boolean;
15
+ /**
16
+ * Whether the provider declares the model tool for at least some of its
17
+ * models, independent of the selected model. Settings surfaces use this to
18
+ * explain provider-level availability; per-request attachment still resolves
19
+ * through supportsModelTool with the selected model.
20
+ */
21
+ export declare function providerOffersModelTool(providerId: string, toolName: ModelToolName): boolean;
22
+ //# sourceMappingURL=model-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-tools.d.ts","sourceRoot":"","sources":["../../src/providers/model-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,uBAAuB,EAEvB,aAAa,EACb,MAAM,eAAe,CAAC;AAKvB,MAAM,WAAW,qBAAqB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAwBD,yEAAyE;AACzE,wBAAgB,iCAAiC,CAChD,QAAQ,EAAE,uBAAuB,EACjC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,QAAQ,EAAE,aAAa,GACrB,OAAO,CAmBT;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAChC,KAAK,EAAE,qBAAqB,EAC5B,QAAQ,EAAE,aAAa,GACrB,OAAO,CAMT;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACtC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,aAAa,GACrB,OAAO,CAQT"}
@@ -0,0 +1,11 @@
1
+ import type { ModelInfo } from "../catalog/types";
2
+ /**
3
+ * The ChatGPT/Codex backend starts rejecting requests around 95% of a
4
+ * model's advertised input cap, so every model exposed through this
5
+ * provider gets its maxInputTokens scaled down to the effective budget.
6
+ *
7
+ * REF: https://github.com/openai/codex/issues/19319
8
+ */
9
+ export declare const CODEX_EFFECTIVE_CONTEXT_WINDOW_PERCENT = 0.95;
10
+ export declare function filterOpenAICodexModels(models: Record<string, ModelInfo>): Record<string, ModelInfo>;
11
+ //# sourceMappingURL=openai-codex-models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openai-codex-models.d.ts","sourceRoot":"","sources":["../../src/providers/openai-codex-models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;GAMG;AACH,eAAO,MAAM,sCAAsC,OAAO,CAAC;AA2C3D,wBAAgB,uBAAuB,CACtC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAC/B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAQ3B"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Auto-generated provider identifiers.
3
+ *
4
+ * Generated by: @cline/llms/scripts/generate-models.ts
5
+ *
6
+ * This is only the models.dev-derived subset. Use BUILT_IN_PROVIDER_IDS from
7
+ * ./ids.ts for the complete registry, including handwritten product and local
8
+ * providers from ./builtins.ts.
9
+ *
10
+ * WARNING: DO NOT EDIT THIS FILE MANUALLY.
11
+ */
12
+ export declare const GENERATED_PROVIDER_IDS: readonly ["302ai", "abacus", "abliteration-ai", "above", "agentrouter", "agnes", "ai-router", "aiand", "aihubmix", "aixy", "aki-io", "alibaba", "alibaba-cn", "alibaba-coding-plan", "alibaba-coding-plan-cn", "alibaba-token-plan", "alibaba-token-plan-cn", "ambient", "amd", "anthropic", "anyapi", "arcee", "atomic-chat", "auriko", "bailing", "baseten", "bedrock", "berget", "blueclaw", "bothub", "cerebras", "chutes", "clarifai", "claudinio", "cline-pass", "cloudferro-sherlock", "cloudflare-workers-ai", "coralbricks", "cortecs", "crof", "crossmodel", "crusoe", "daoxe", "databricks", "deepseek", "digitalocean", "dinference", "drun", "ebcloud", "echo", "edenai", "empiriolabs", "evroc", "fastrouter", "fireworks", "freemodel", "friendli", "frogbot", "gemini", "github-copilot", "gmicloud", "greenpt", "groq", "helicone", "hetzner", "hpc-ai", "huggingface", "hyper", "iflowcn", "impossibl", "inception", "inceptron", "inference", "inferx", "infomaniak", "io-net", "iteracompute", "jalapeno", "jiekou", "kenari", "kilo", "kimi-for-coding", "klokintegration", "kosmik", "kuae-cloud-coding-plan", "lilac", "llama", "llmgateway", "llmgateway-providers", "llmtech", "llmtr", "lmstudio", "longcat", "lucidquery", "lynkr", "meganova", "meta", "minimax", "minimax-cn", "minimax-cn-coding-plan", "minimax-coding-plan", "mistral", "mixlayer", "moark", "modal", "model-oracle-ai", "modelis", "modelscope", "moonshot", "moonshotai-cn", "morph", "nano-gpt", "nearai", "nebius", "neon", "neosmith", "neuralwatt", "nova", "novita-ai", "nvidia", "ofox", "ollama", "openai-native", "opencode", "opencode-go", "openreason", "openrouter", "opper", "orcarouter", "ovhcloud", "pendra", "perplexity-agent", "pioneer", "poe", "poolside", "privatemode-ai", "qihang-ai", "qiniu-ai", "regolo-ai", "requesty", "routing-run", "runinfra", "sakana", "sapaicore", "sarvam", "scaleway", "scnet-token-plan", "scx-ai", "sensenova", "siliconflow", "siliconflow-cn", "snowflake-cortex", "stackit", "standardcompute", "stepfun", "stepfun-ai", "stepfun-ai-step-plan", "stepfun-step-plan", "subconscious", "submodel", "synthetic", "tencent-coding-plan", "tencent-token-plan", "tencent-tokenhub", "tensorx", "the-grid-ai", "thinkingmachines", "tinfoil", "together", "tokengo", "tokenrouter", "trustedrouter", "umans-ai", "umans-ai-coding-plan", "unorouter", "upstage", "v0", "vancine", "vercel-ai-gateway", "vertex", "vivgrid", "volcengine", "volcengine-coding-plan", "vultr", "wafer.ai", "wandb", "xai", "xiaomi", "xiaomi-token-plan-ams", "xiaomi-token-plan-cn", "xiaomi-token-plan-sgp", "xpersona", "zai", "zai-coding-plan", "zeldoc", "zenifra", "zenmux", "zhipuai", "zhipuai-coding-plan"];
13
+ //# sourceMappingURL=provider-ids.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-ids.generated.d.ts","sourceRoot":"","sources":["../../src/providers/provider-ids.generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,4lFAwMzB,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const MODELS_DEV_PROVIDER_KEY_MAP: {
2
+ [k: string]: string;
3
+ };
4
+ /**
5
+ * Providers that must remain excluded even when their models.dev entry uses a
6
+ * supported AI SDK package. IDs use Cline's generated provider identifiers
7
+ * after applying MODELS_DEV_PROVIDER_KEY_MAP.
8
+ */
9
+ export declare const MODELS_DEV_BLOCKED_PROVIDER_IDS: ReadonlySet<string>;
10
+ export declare const MODELS_DEV_CURRENT_BUILTIN_PROVIDER_KEYS: Set<string>;
11
+ export declare function resolveGeneratedProviderIdForModelsDevKey(modelsDevKey: string): string | undefined;
12
+ export declare function resolveProviderModelCatalogKeys(providerId: string): string[];
13
+ //# sourceMappingURL=provider-keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-keys.d.ts","sourceRoot":"","sources":["../../src/providers/provider-keys.ts"],"names":[],"mappings":"AA2JA,eAAO,MAAM,2BAA2B;;CAMvC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,EAAE,WAAW,CAAC,MAAM,CAAa,CAAC;AAE9E,eAAO,MAAM,wCAAwC,aAEpD,CAAC;AAEF,wBAAgB,yCAAyC,CACxD,YAAY,EAAE,MAAM,GAClB,MAAM,GAAG,SAAS,CAEpB;AAED,wBAAgB,+BAA+B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAmB5E"}
@@ -0,0 +1,10 @@
1
+ import type { GatewayStreamRequest } from "@cerebriline/shared";
2
+ type CaptureStage = "ai_sdk_prompt" | "wire_request";
3
+ export declare function recordProviderRequestCapture(input: {
4
+ stage: CaptureStage;
5
+ request: GatewayStreamRequest;
6
+ payload: unknown;
7
+ }): void;
8
+ export declare function wrapFetchForProviderRequestCapture(baseFetch: typeof fetch | undefined, request: GatewayStreamRequest): typeof fetch | undefined;
9
+ export {};
10
+ //# sourceMappingURL=provider-request-capture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-request-capture.d.ts","sourceRoot":"","sources":["../../src/providers/provider-request-capture.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAI1D,KAAK,YAAY,GAAG,eAAe,GAAG,cAAc,CAAC;AA8RrD,wBAAgB,4BAA4B,CAAC,KAAK,EAAE;IACnD,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;CACjB,GAAG,IAAI,CA4BP;AA8BD,wBAAgB,kCAAkC,CACjD,SAAS,EAAE,OAAO,KAAK,GAAG,SAAS,EACnC,OAAO,EAAE,oBAAoB,GAC3B,OAAO,KAAK,GAAG,SAAS,CAwC1B"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Auto-generated provider catalog.
3
+ *
4
+ * Generated by: @cline/llms/scripts/generate-models.ts
5
+ *
6
+ * To generate a models.dev provider, ensure its upstream entry uses an AI SDK
7
+ * package supported by catalog-live.ts. Add an ID mapping in provider-keys.ts
8
+ * when Cline's generated ID differs from the models.dev key, and ensure the ID
9
+ * is not in MODELS_DEV_BLOCKED_PROVIDER_IDS. Then run:
10
+ * bun -F @cline/llms generate:models
11
+ *
12
+ * Product/runtime-only providers belong in builtins.ts and are merged with
13
+ * this catalog; they do not need to appear in this generated file.
14
+ *
15
+ * WARNING: DO NOT EDIT THIS FILE MANUALLY.
16
+ */
17
+ import type { BuiltinSpec } from "./builtin-types";
18
+ export declare const GENERATED_PROVIDER_SPECS: readonly BuiltinSpec[];
19
+ //# sourceMappingURL=providers.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"providers.generated.d.ts","sourceRoot":"","sources":["../../src/providers/providers.generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,eAAO,MAAM,wBAAwB,EAAE,SAAS,WAAW,EAiuF1D,CAAC"}
@@ -0,0 +1,140 @@
1
+ import { type ReasoningHistoryMode, type ReasoningHistoryPlan, type ReasoningHistorySetting } from "@cerebriline/shared";
2
+ /**
3
+ * Whether prior assistant reasoning can reach this endpoint, and whether the
4
+ * endpoint puts it back into the prompt.
5
+ *
6
+ * Two separate questions, and both have to be yes.
7
+ *
8
+ * **Nothing here is decided from a name.** Not the provider id, not the
9
+ * renderer, not the model. Engines change their renderers and their chat
10
+ * templates between releases, and a table of names that says "qwen3.5
11
+ * re-injects" is only true until the next build -- at which point it fails
12
+ * silently and in the expensive direction, because the estimator measures with
13
+ * the same answer. Both probes below ask the server what it actually does with
14
+ * a conversation that contains reasoning, and believe only the result.
15
+ *
16
+ * Measured 2026-09-18 against a live ollama on solidPC (`qwen3.5:2b`,
17
+ * `/api/chat`, `num_predict 1`) -- the same three messages cost:
18
+ *
19
+ * 48 prompt tokens with no `thinking` field
20
+ * 929 prompt tokens with 2,800 characters of `thinking`
21
+ *
22
+ * and with the assistant message placed *before* the last user turn, 31 tokens
23
+ * either way. So the answer depends on the shape of the conversation and on
24
+ * `think` being set, which is exactly why it is measured rather than declared.
25
+ */
26
+ export interface ReasoningReinjection {
27
+ /** How prior reasoning can be carried, if at all. */
28
+ channel: "native-thinking" | "reasoning-content" | "none";
29
+ /**
30
+ * Whether the server renders it back into the prompt. `undefined` means
31
+ * nobody has been able to ask yet -- which is not the same as `false`, but
32
+ * is treated the same way until it is answered.
33
+ */
34
+ reinjects: boolean | undefined;
35
+ /** What the probe actually saw, for the log and the settings panel. */
36
+ detail?: string;
37
+ }
38
+ /**
39
+ * What was measured for this endpoint and model, if anything.
40
+ *
41
+ * Synchronous on purpose. The compaction pipeline has to measure the request
42
+ * the gateway is about to send and cannot await a probe mid-decision, so the
43
+ * probe fills this map and every later reader is a lookup. Same shape as the
44
+ * `declaredNumCtx` cache the ollama vendor already keeps.
45
+ */
46
+ export declare function cachedReinjection(baseUrl: string | undefined, modelId: string): ReasoningReinjection | undefined;
47
+ export declare function resetReasoningReinjection(): void;
48
+ /**
49
+ * What `auto` means once the capability is known.
50
+ *
51
+ * Never "all", even when the server is proven to re-inject. Ollama's qwen3.5
52
+ * renderer re-renders every assistant think block after the *last user turn*,
53
+ * and an agent run has exactly one user message -- so "all" renders the whole
54
+ * accumulated thinking history into every prompt. Run 20260918-022626-0367
55
+ * produced 413,766 characters of reasoning in 50 turns, against a 48k window.
56
+ *
57
+ * "last" is the bounded form: the model gets its most recent reasoning and the
58
+ * prompt does not grow without limit.
59
+ *
60
+ * Unproven is treated as "do not send". Sending reasoning to a server that
61
+ * ignores it costs no prompt tokens, but the estimator measures with this same
62
+ * mode, so it would count characters that never became any -- the 2.23x
63
+ * overstatement that shrank an output cap to 32,000 on a 262,144 window.
64
+ */
65
+ export declare function autoReasoningHistoryMode(capability: ReasoningReinjection | undefined, unprobed?: ReasoningHistoryMode): ReasoningHistoryMode;
66
+ /**
67
+ * Measure whether ollama re-renders `thinking` into the prompt, by asking it.
68
+ *
69
+ * Ollama serves no template-rendering endpoint, so the prompt itself cannot be
70
+ * read back. What can be read back is its length: `/api/chat` reports
71
+ * `prompt_eval_count`, so sending the same conversation twice -- once with a
72
+ * `thinking` field and once without -- measures the re-injection directly, in
73
+ * the engine's own tokens, with no knowledge of renderers or templates.
74
+ *
75
+ * The conversation is deliberately shaped like an agent turn (one user message
76
+ * first, the assistant after it, a tool result last) because that shape is what
77
+ * decides the answer: with a user message last, the same probe returns equal
78
+ * counts and the honest reading is "not in this conversation".
79
+ *
80
+ * `num_predict: 1` keeps generation to a single token; the cost is one prompt
81
+ * eval of a handful of tokens. This does require the model to be loaded, which
82
+ * is why it is called at first use rather than at settings time -- see
83
+ * `probeOnFirstUse` at the call site. Nothing is inferred when the probe fails:
84
+ * an unreachable server leaves the capability unproven, which sends nothing.
85
+ */
86
+ export declare function primeOllamaReinjection(baseUrl: string | undefined, modelId: string, fetchImpl?: typeof fetch): Promise<void>;
87
+ /**
88
+ * Render a needle through the server's own chat template and look for it.
89
+ *
90
+ * The llama.cpp/opencoti probe, and the stronger of the two: `/apply-template`
91
+ * returns the server's own formatted prompt, so "does this template re-inject
92
+ * reasoning" is answered by reading the prompt rather than by measuring its
93
+ * length. It is CPU-only and takes no slot, so it is safe to call while the
94
+ * server is busy, and it costs no model load -- which is why this side can be
95
+ * probed at settings time and ollama's cannot.
96
+ *
97
+ * Both field spellings go out because the two engines disagree and a template
98
+ * reads whichever its author chose; the needle is what is looked for, not the
99
+ * field.
100
+ */
101
+ export declare function primeTemplateReinjection(baseUrl: string | undefined, modelId: string, fetchImpl?: typeof fetch): Promise<void>;
102
+ /**
103
+ * The mode the request path will use, from what the profile stored.
104
+ *
105
+ * An explicit choice always wins, including against the probe. The probe
106
+ * describes the server as it is right now; an operator testing a template they
107
+ * are about to change, or working around a probe that cannot run, has to be
108
+ * able to override it or the setting is decoration. `auto` -- and an unset
109
+ * value, which means the same -- defers to the measurement.
110
+ */
111
+ export declare function resolveReasoningHistorySetting(setting: ReasoningHistorySetting | undefined, baseUrl: string | undefined, modelId: string, unprobed?: ReasoningHistoryMode): ReasoningHistoryMode;
112
+ /**
113
+ * The same resolution, but saying how the reasoning travels as well as how much.
114
+ *
115
+ * `resolveReasoningHistorySetting` answers one question -- how much -- and its
116
+ * answer for a server whose template drops the field is "none", which is
117
+ * correct about the field and wrong about the model: the model then starts
118
+ * every turn without the reasoning it produced in the last one.
119
+ *
120
+ * goose takes the other route in that case. It puts the block into the
121
+ * assistant's own content, wrapped in `<think>`, because content is the one
122
+ * thing every chat template renders. This resolver selects it only where the
123
+ * evidence says the field is dead:
124
+ *
125
+ * - **measured, and the template drops it** -- inline. Nothing is lost by
126
+ * sending the field as well, but nothing is gained either, and the estimator
127
+ * would then count it twice.
128
+ * - **measured, and the template renders it** -- native. Inlining on top would
129
+ * send the same thinking twice, once in each place.
130
+ * - **no reasoning channel at all** -- inline, for the same reason as the
131
+ * first case.
132
+ * - **never measured** -- native, at whatever the unprobed fallback is. The
133
+ * probe failing is not evidence that the field is dropped, and a hosted API
134
+ * that specifies reasoning replay must keep it.
135
+ *
136
+ * `allowInline` is the operator's switch over the whole fallback, on by
137
+ * default. Off, this degrades exactly to the mode resolver.
138
+ */
139
+ export declare function resolveReasoningHistoryPlan(setting: ReasoningHistorySetting | undefined, baseUrl: string | undefined, modelId: string, unprobed?: ReasoningHistoryMode, allowInline?: boolean): ReasoningHistoryPlan;
140
+ //# sourceMappingURL=reasoning-history.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reasoning-history.d.ts","sourceRoot":"","sources":["../../src/providers/reasoning-history.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,MAAM,eAAe,CAAC;AAEvB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,oBAAoB;IACpC,qDAAqD;IACrD,OAAO,EAAE,iBAAiB,GAAG,mBAAmB,GAAG,MAAM,CAAC;IAC1D;;;;OAIG;IACH,SAAS,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAwCD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAChC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,OAAO,EAAE,MAAM,GACb,oBAAoB,GAAG,SAAS,CAElC;AAED,wBAAgB,yBAAyB,IAAI,IAAI,CAEhD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,wBAAwB,CACvC,UAAU,EAAE,oBAAoB,GAAG,SAAS,EAC5C,QAAQ,GAAE,oBAA6B,GACrC,oBAAoB,CActB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,sBAAsB,CAC3C,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,OAAO,EAAE,MAAM,EACf,SAAS,GAAE,OAAO,KAAa,GAC7B,OAAO,CAAC,IAAI,CAAC,CA2Df;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,wBAAwB,CAC7C,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,OAAO,EAAE,MAAM,EACf,SAAS,GAAE,OAAO,KAAa,GAC7B,OAAO,CAAC,IAAI,CAAC,CA4Cf;AAED;;;;;;;;GAQG;AACH,wBAAgB,8BAA8B,CAC7C,OAAO,EAAE,uBAAuB,GAAG,SAAS,EAC5C,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,OAAO,EAAE,MAAM,EACf,QAAQ,GAAE,oBAA6B,GACrC,oBAAoB,CAQtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,2BAA2B,CAC1C,OAAO,EAAE,uBAAuB,GAAG,SAAS,EAC5C,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,OAAO,EAAE,MAAM,EACf,QAAQ,GAAE,oBAA6B,EACvC,WAAW,UAAO,GAChB,oBAAoB,CAsBtB"}
@@ -0,0 +1,19 @@
1
+ import type { GatewayModelDefinition, GatewayModelSelection, GatewayProviderConfig, GatewayProviderFactory, GatewayProviderManifest, GatewayProviderRegistration, GatewayResolvedModel, GatewayResolvedProviderConfig } from "@cerebriline/shared";
2
+ export declare class GatewayRegistry {
3
+ private readonly providers;
4
+ private readonly providerConfigs;
5
+ private readonly fallbackFetch?;
6
+ constructor(fetchImpl?: typeof fetch);
7
+ registerProvider(registration: GatewayProviderRegistration): void;
8
+ configureProvider(config: GatewayProviderConfig): void;
9
+ listProviders(): GatewayProviderManifest[];
10
+ listModels(providerId?: string): GatewayModelDefinition[];
11
+ getManifest(providerId: string): GatewayProviderManifest | undefined;
12
+ resolveModel(selection: GatewayModelSelection): GatewayResolvedModel;
13
+ createProvider(providerId: string): Promise<{
14
+ manifest: GatewayProviderManifest;
15
+ config: GatewayResolvedProviderConfig;
16
+ createProvider: GatewayProviderFactory;
17
+ }>;
18
+ }
19
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/providers/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EAEvB,2BAA2B,EAC3B,oBAAoB,EACpB,6BAA6B,EAC7B,MAAM,eAAe,CAAC;AAkIvB,qBAAa,eAAe;IAC3B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqC;IAC/D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA2C;IAC3E,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAe;gBAElC,SAAS,CAAC,EAAE,OAAO,KAAK;IAIpC,gBAAgB,CAAC,YAAY,EAAE,2BAA2B,GAAG,IAAI;IAkCjE,iBAAiB,CAAC,MAAM,EAAE,qBAAqB,GAAG,IAAI;IA6BtD,aAAa,IAAI,uBAAuB,EAAE;IAS1C,UAAU,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,sBAAsB,EAAE;IAUzD,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,uBAAuB,GAAG,SAAS;IA8BpE,YAAY,CAAC,SAAS,EAAE,qBAAqB,GAAG,oBAAoB;IAmB9D,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;QACjD,QAAQ,EAAE,uBAAuB,CAAC;QAClC,MAAM,EAAE,6BAA6B,CAAC;QACtC,cAAc,EAAE,sBAAsB,CAAC;KACvC,CAAC;CAoEF"}
@@ -0,0 +1,30 @@
1
+ export interface ProviderRequestHeaderClientContext {
2
+ name?: string;
3
+ version?: string;
4
+ versionHeaderFallback?: string;
5
+ platform?: string;
6
+ platformVersion?: string;
7
+ isMultiRoot?: boolean;
8
+ }
9
+ export interface ProviderRequestHeaderLayers {
10
+ stored?: Record<string, string>;
11
+ config?: Record<string, string>;
12
+ session?: Record<string, string>;
13
+ }
14
+ export interface OpenAICodexRequestHeaderContext {
15
+ accountId?: string;
16
+ accessToken?: string;
17
+ userAgentVersion?: string;
18
+ }
19
+ export interface ResolveProviderRequestHeadersInput {
20
+ providerId: string;
21
+ sessionId: string;
22
+ source?: string;
23
+ defaultSource: string;
24
+ client?: ProviderRequestHeaderClientContext;
25
+ coreVersion: string;
26
+ openAiCodex?: OpenAICodexRequestHeaderContext;
27
+ headers?: ProviderRequestHeaderLayers;
28
+ }
29
+ export declare function resolveProviderRequestHeaders(input: ResolveProviderRequestHeadersInput): Record<string, string> | undefined;
30
+ //# sourceMappingURL=request-headers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-headers.d.ts","sourceRoot":"","sources":["../../src/providers/request-headers.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kCAAkC;IAClD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,2BAA2B;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,+BAA+B;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,kCAAkC;IAClD,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,kCAAkC,CAAC;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,+BAA+B,CAAC;IAC9C,OAAO,CAAC,EAAE,2BAA2B,CAAC;CACtC;AAqHD,wBAAgB,6BAA6B,CAC5C,KAAK,EAAE,kCAAkC,GACvC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAYpC"}
@@ -0,0 +1,20 @@
1
+ import type { RequestTimings } from "@cerebriline/shared";
2
+ /**
3
+ * Read whichever engine's timings are in this request's provider metadata.
4
+ *
5
+ * Returns nothing for every provider that reports none, which is most of them.
6
+ * That absence is carried through to the UI as an absence: Cline's own
7
+ * `requestMs` still stands on its own, and inventing a prompt/generation split
8
+ * from it would be a guess presented as a measurement.
9
+ */
10
+ export declare function readEngineTimings(providerMetadata: unknown): RequestTimings | undefined;
11
+ /**
12
+ * Combine what Cline measured with what the engine reported.
13
+ *
14
+ * Cline's numbers are never overwritten by the engine's: they answer different
15
+ * questions, and a request whose measured wall time exceeds the engine's total
16
+ * spent that gap waiting to be admitted -- which is exactly the thing a user
17
+ * chasing a slow local model needs to see.
18
+ */
19
+ export declare function mergeRequestTimings(measured: RequestTimings, engine: RequestTimings | undefined): RequestTimings;
20
+ //# sourceMappingURL=request-timings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-timings.d.ts","sourceRoot":"","sources":["../../src/providers/request-timings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AA0KpD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAChC,gBAAgB,EAAE,OAAO,GACvB,cAAc,GAAG,SAAS,CAsB5B;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAClC,QAAQ,EAAE,cAAc,EACxB,MAAM,EAAE,cAAc,GAAG,SAAS,GAChC,cAAc,CAEhB"}