@linxiraos/pi-catalog 1.1.27 → 1.2.0

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 (100) hide show
  1. package/CHANGELOG.md +4 -17
  2. package/dist/types/compat/auth-ids.d.ts +2 -2
  3. package/dist/types/compat/judgment-questions.d.ts +7 -0
  4. package/dist/types/compat/prompt-cache-lookback.d.ts +7 -0
  5. package/dist/types/compat/provider-ids.d.ts +1 -1
  6. package/dist/types/compat/reasoning-carry.d.ts +21 -0
  7. package/dist/types/compat/request-size.d.ts +7 -0
  8. package/dist/types/compat/taxonomy.d.ts +0 -10
  9. package/dist/types/compat/types.d.ts +4 -0
  10. package/dist/types/discovery/antigravity.d.ts +13 -3
  11. package/dist/types/model-manager.d.ts +16 -0
  12. package/dist/types/provider-models/account-access.d.ts +11 -0
  13. package/dist/types/provider-models/google.d.ts +23 -1
  14. package/dist/types/provider-models/openai-compat.d.ts +19 -1
  15. package/dist/types/provider-models/special.d.ts +2 -0
  16. package/dist/types/types.d.ts +106 -20
  17. package/dist/types/wire/cloudflare-ai-gateway.d.ts +0 -10
  18. package/dist/types/wire/cloudflare.d.ts +10 -0
  19. package/dist/types/wire/factory-droid.d.ts +1 -1
  20. package/package.json +4 -4
  21. package/src/build.ts +39 -35
  22. package/src/compat/auth-ids.ts +4 -0
  23. package/src/compat/axes.ts +37 -3
  24. package/src/compat/cascade.ts +6 -1
  25. package/src/compat/judgment-questions.ts +12 -0
  26. package/src/compat/prompt-cache-lookback.ts +23 -0
  27. package/src/compat/provider-ids.d.ts +1 -1
  28. package/src/compat/provider-ids.ts +2 -0
  29. package/src/compat/reasoning-carry.ts +64 -0
  30. package/src/compat/request-size.ts +25 -0
  31. package/src/compat/resolve.ts +16 -2
  32. package/src/compat/rules/README.md +12 -2
  33. package/src/compat/rules/auth/_order.kdl +2 -2
  34. package/src/compat/rules/auth/cloudflare-workers-ai.kdl +9 -0
  35. package/src/compat/rules/auth/coralbricks.kdl +13 -0
  36. package/src/compat/rules/auth/minimax-code-cn.kdl +1 -1
  37. package/src/compat/rules/auth/minimax-code.kdl +1 -1
  38. package/src/compat/rules/auth/openai-codex.kdl +1 -1
  39. package/src/compat/rules/auth/stencil.kdl +1 -1
  40. package/src/compat/rules/classes/anthropic.kdl +87 -1
  41. package/src/compat/rules/classes/deepseek.kdl +6 -0
  42. package/src/compat/rules/classes/glm.kdl +16 -7
  43. package/src/compat/rules/classes/kimi.kdl +8 -0
  44. package/src/compat/rules/classes/minimax.kdl +31 -1
  45. package/src/compat/rules/classes/openai.kdl +5 -3
  46. package/src/compat/rules/classes/qwen.kdl +2 -1
  47. package/src/compat/rules/providers/abliteration.kdl +7 -0
  48. package/src/compat/rules/providers/anthropic.kdl +13 -0
  49. package/src/compat/rules/providers/apple.kdl +1 -0
  50. package/src/compat/rules/providers/cloudflare-workers-ai.kdl +34 -0
  51. package/src/compat/rules/providers/coralbricks.kdl +62 -0
  52. package/src/compat/rules/providers/cursor.kdl +22 -0
  53. package/src/compat/rules/providers/devin.kdl +2 -2
  54. package/src/compat/rules/providers/factory-droid.kdl +77 -13
  55. package/src/compat/rules/providers/github-copilot.kdl +29 -0
  56. package/src/compat/rules/providers/groq.kdl +21 -0
  57. package/src/compat/rules/providers/judgment-questions.kdl +53 -0
  58. package/src/compat/rules/providers/litellm.kdl +4 -1
  59. package/src/compat/rules/providers/minimax-code-cn.kdl +10 -5
  60. package/src/compat/rules/providers/minimax-code.kdl +10 -5
  61. package/src/compat/rules/providers/mistral.kdl +25 -1
  62. package/src/compat/rules/providers/moonshot.kdl +11 -0
  63. package/src/compat/rules/providers/openai-codex.kdl +17 -13
  64. package/src/compat/rules/providers/openai.kdl +22 -0
  65. package/src/compat/rules/providers/opencode-zen.kdl +20 -0
  66. package/src/compat/rules/providers/openrouter.kdl +6 -0
  67. package/src/compat/rules/providers/zhipu-coding-plan.kdl +10 -0
  68. package/src/compat/rules/runtime/behavior.kdl +7 -4
  69. package/src/compat/rules/taxonomy/_collapse.kdl +18 -0
  70. package/src/compat/rules.json +1 -1
  71. package/src/compat/taxonomy.d.ts +0 -10
  72. package/src/compat/taxonomy.ts +3 -3
  73. package/src/compat/types.d.ts +4 -0
  74. package/src/compat/types.ts +4 -0
  75. package/src/discovery/antigravity.d.ts +13 -3
  76. package/src/discovery/antigravity.ts +33 -17
  77. package/src/discovery/cursor.ts +2 -1
  78. package/src/discovery/devin.ts +20 -2
  79. package/src/model-cache.ts +113 -47
  80. package/src/model-manager.d.ts +16 -0
  81. package/src/model-manager.ts +107 -41
  82. package/src/model-tokenizer.ts +3 -0
  83. package/src/models.json +1 -1
  84. package/src/provider-models/account-access.d.ts +11 -0
  85. package/src/provider-models/account-access.ts +30 -0
  86. package/src/provider-models/cache-provider-id.ts +3 -2
  87. package/src/provider-models/descriptors.ts +4 -0
  88. package/src/provider-models/google.d.ts +23 -1
  89. package/src/provider-models/google.ts +70 -14
  90. package/src/provider-models/openai-compat.d.ts +19 -1
  91. package/src/provider-models/openai-compat.ts +215 -31
  92. package/src/provider-models/special.d.ts +2 -0
  93. package/src/provider-models/special.ts +15 -18
  94. package/src/types.d.ts +106 -20
  95. package/src/types.ts +149 -17
  96. package/src/wire/cloudflare-ai-gateway.d.ts +0 -10
  97. package/src/wire/cloudflare-ai-gateway.ts +0 -36
  98. package/src/wire/cloudflare.ts +40 -0
  99. package/src/wire/factory-droid.d.ts +1 -1
  100. package/src/wire/factory-droid.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -1,25 +1,12 @@
1
- # Changelog
2
-
3
1
  ## [Unreleased]
4
2
 
5
- ## [1.1.27] - 2026-10-07
6
-
7
- - 版本线推进至 1.1.27;本版无独立用户可见变化。
8
-
9
- ### Added
3
+ ## [1.2.0] - 2026-10-12
10
4
 
11
- - Added an optional `statefulResponses` compat field for OpenAI Responses models, kept through OpenRouter's Responses dispatch ([#13686](https://github.com/can1357/oh-my-pi/pull/13686) by [@alphastorm](https://github.com/alphastorm)).
12
- - Added 15 Snowflake Cortex models with account-specific endpoints, Cortex compatibility rules, and estimated account-billed pricing ([#14507](https://github.com/can1357/oh-my-pi/pull/14507) by [@jorgoose](https://github.com/jorgoose)).
13
- - Added the `image-tokenization` axis, which declares how GPT-5.2+, Claude and Gemini 3 lines bill input images on every host, with wire-API fallback rules for other models, plus `imageTokens()` to price one image ([#14286](https://github.com/can1357/oh-my-pi/pull/14286) by [@will-bogusz](https://github.com/will-bogusz)).
5
+ - 版本线推进至 1.2.0;本版无独立用户可见变化。
14
6
 
15
- ### Changed
16
-
17
- - Changed OpenAI Responses endpoints other than OpenAI, Azure OpenAI, and Codex (custom and local servers, proxies including `azure`/`openai-codex` providers pointed at a non-Azure/non-Codex `baseUrl`, OpenRouter) to default `supportsImageDetailOriginal` to `false`, so snapcompact frames and computer screenshots go out as `detail: "auto"` instead of failing on servers that reject `original`; set `compat.supportsImageDetailOriginal: true` to opt a host in ([#13687](https://github.com/can1357/oh-my-pi/pull/13687) by [@alphastorm](https://github.com/alphastorm)).
18
- - Muse Code can now store Responses results on Meta's side (`store-responses`), so a turn whose connection drops can be recovered instead of re-run. Storage is opt-in via the omp setting `providers.muse-code.storeResponses` or `PI_MUSE_STORE_RESPONSES=1` ([#14293](https://github.com/can1357/oh-my-pi/pull/14293) and [#14534](https://github.com/can1357/oh-my-pi/pull/14534) by [@abilliontokens](https://github.com/abilliontokens)).
19
-
20
- ## [1.1.25] - 2026-10-03
7
+ ## [1.1.27] - 2026-10-07
21
8
 
22
- - 版本线推进至 1.1.25;本版无独立用户可见变化。
9
+ - 版本线推进至 1.1.27;本版无独立用户可见变化。
23
10
 
24
11
  ## [1.1.24] - 2026-10-03
25
12
 
@@ -1,4 +1,4 @@
1
1
  /** Every provider with an `auth/<id>.kdl` policy. */
2
- export type AuthProviderId = "abliteration" | "aiand" | "aimlapi" | "alibaba-coding-plan" | "alibaba-token-plan" | "amazon-bedrock" | "anthropic" | "apple" | "azure" | "baseten" | "bedrock-mantle" | "cerebras" | "charm-hyper" | "cline-pass" | "cloudflare-ai-gateway" | "commandcode" | "coreweave" | "cursor" | "deepinfra" | "deepseek" | "devin" | "exa" | "factory-droid" | "firepass" | "fireworks" | "github-copilot" | "gitlab-duo" | "gitlab-duo-agent" | "gmi-cloud" | "google" | "google-antigravity" | "google-gemini-cli" | "google-vertex" | "groq" | "helmcode" | "huggingface" | "kagi" | "kilo" | "kimi-code" | "litellm" | "llama.cpp" | "lm-studio" | "local" | "meta" | "minimax" | "minimax-code" | "minimax-code-cn" | "mistral" | "moonshot" | "muse-code" | "nanogpt" | "novita" | "nvidia" | "ollama" | "ollama-cloud" | "openai" | "openai-codex" | "openai-codex-device" | "opencode-go" | "opencode-zen" | "openrouter" | "parallel" | "perplexity" | "qianfan" | "qwen-portal" | "sakana" | "siliconflow" | "siliconflow-cn" | "singularityapi-dev" | "singularityapi-tech" | "snowflake" | "stencil" | "stepfun" | "synthetic" | "tavily" | "together" | "typesafe" | "umans" | "venice" | "vercel-ai-gateway" | "vllm" | "wafer-serverless" | "web" | "xai" | "xai-oauth" | "xiaomi" | "xiaomi-token-plan-ams" | "xiaomi-token-plan-cn" | "xiaomi-token-plan-sgp" | "yolo-auto" | "zai" | "zai-coding-plan" | "zenmux" | "zhipu-coding-plan";
2
+ export type AuthProviderId = "abliteration" | "aiand" | "aimlapi" | "alibaba-coding-plan" | "alibaba-token-plan" | "amazon-bedrock" | "anthropic" | "apple" | "azure" | "baseten" | "bedrock-mantle" | "cerebras" | "charm-hyper" | "cline-pass" | "cloudflare-ai-gateway" | "cloudflare-workers-ai" | "commandcode" | "coralbricks" | "coreweave" | "cursor" | "deepinfra" | "deepseek" | "devin" | "exa" | "factory-droid" | "firepass" | "fireworks" | "github-copilot" | "gitlab-duo" | "gitlab-duo-agent" | "gmi-cloud" | "google" | "google-antigravity" | "google-gemini-cli" | "google-vertex" | "groq" | "helmcode" | "huggingface" | "kagi" | "kilo" | "kimi-code" | "litellm" | "llama.cpp" | "lm-studio" | "local" | "meta" | "minimax" | "minimax-code" | "minimax-code-cn" | "mistral" | "moonshot" | "muse-code" | "nanogpt" | "novita" | "nvidia" | "ollama" | "ollama-cloud" | "openai" | "openai-codex" | "openai-codex-device" | "opencode-go" | "opencode-zen" | "openrouter" | "parallel" | "perplexity" | "qianfan" | "qwen-portal" | "sakana" | "siliconflow" | "siliconflow-cn" | "singularityapi-dev" | "singularityapi-tech" | "snowflake" | "stencil" | "stepfun" | "synthetic" | "tavily" | "together" | "typesafe" | "umans" | "venice" | "vercel-ai-gateway" | "vllm" | "wafer-serverless" | "web" | "xai" | "xai-oauth" | "xiaomi" | "xiaomi-token-plan-ams" | "xiaomi-token-plan-cn" | "xiaomi-token-plan-sgp" | "yolo-auto" | "zai" | "zai-coding-plan" | "zenmux" | "zhipu-coding-plan";
3
3
  /** Providers whose policy declares a `login` flow (the `/login` roster). */
4
- export type LoginProviderId = "abliteration" | "aiand" | "alibaba-coding-plan" | "alibaba-token-plan" | "anthropic" | "baseten" | "cerebras" | "charm-hyper" | "cline-pass" | "cloudflare-ai-gateway" | "commandcode" | "coreweave" | "cursor" | "deepinfra" | "deepseek" | "devin" | "exa" | "factory-droid" | "firepass" | "fireworks" | "github-copilot" | "gitlab-duo" | "gitlab-duo-agent" | "gmi-cloud" | "google-antigravity" | "google-gemini-cli" | "helmcode" | "huggingface" | "kagi" | "kilo" | "kimi-code" | "litellm" | "llama.cpp" | "lm-studio" | "meta" | "minimax-code" | "minimax-code-cn" | "moonshot" | "muse-code" | "nanogpt" | "novita" | "nvidia" | "ollama" | "ollama-cloud" | "openai-codex" | "openai-codex-device" | "opencode-go" | "opencode-zen" | "openrouter" | "parallel" | "perplexity" | "qianfan" | "qwen-portal" | "sakana" | "siliconflow" | "siliconflow-cn" | "singularityapi-dev" | "singularityapi-tech" | "snowflake" | "stencil" | "stepfun" | "synthetic" | "tavily" | "together" | "typesafe" | "umans" | "venice" | "vercel-ai-gateway" | "vllm" | "wafer-serverless" | "xai" | "xai-oauth" | "xiaomi" | "xiaomi-token-plan-ams" | "xiaomi-token-plan-cn" | "xiaomi-token-plan-sgp" | "yolo-auto" | "zai" | "zai-coding-plan" | "zenmux" | "zhipu-coding-plan";
4
+ export type LoginProviderId = "abliteration" | "aiand" | "alibaba-coding-plan" | "alibaba-token-plan" | "anthropic" | "baseten" | "cerebras" | "charm-hyper" | "cline-pass" | "cloudflare-ai-gateway" | "cloudflare-workers-ai" | "commandcode" | "coralbricks" | "coreweave" | "cursor" | "deepinfra" | "deepseek" | "devin" | "exa" | "factory-droid" | "firepass" | "fireworks" | "github-copilot" | "gitlab-duo" | "gitlab-duo-agent" | "gmi-cloud" | "google-antigravity" | "google-gemini-cli" | "helmcode" | "huggingface" | "kagi" | "kilo" | "kimi-code" | "litellm" | "llama.cpp" | "lm-studio" | "meta" | "minimax-code" | "minimax-code-cn" | "moonshot" | "muse-code" | "nanogpt" | "novita" | "nvidia" | "ollama" | "ollama-cloud" | "openai-codex" | "openai-codex-device" | "opencode-go" | "opencode-zen" | "openrouter" | "parallel" | "perplexity" | "qianfan" | "qwen-portal" | "sakana" | "siliconflow" | "siliconflow-cn" | "singularityapi-dev" | "singularityapi-tech" | "snowflake" | "stencil" | "stepfun" | "synthetic" | "tavily" | "together" | "typesafe" | "umans" | "venice" | "vercel-ai-gateway" | "vllm" | "wafer-serverless" | "xai" | "xai-oauth" | "xiaomi" | "xiaomi-token-plan-ams" | "xiaomi-token-plan-cn" | "xiaomi-token-plan-sgp" | "yolo-auto" | "zai" | "zai-coding-plan" | "zenmux" | "zhipu-coding-plan";
@@ -0,0 +1,7 @@
1
+ import type { Model } from "../types.js";
2
+ /**
3
+ * Most questions one System One judgment request to this model may carry
4
+ * (`judgment-questions-max` axis), or `undefined` when the endpoint takes any
5
+ * batch size.
6
+ */
7
+ export declare function resolveJudgmentQuestionsMax(model: Model): number | undefined;
@@ -0,0 +1,7 @@
1
+ import type { Model } from "../types.js";
2
+ /**
3
+ * Block positions the provider's prompt cache checks back from a breakpoint for
4
+ * an earlier request's entry (`prompt-cache-lookback` axis), or `undefined` when
5
+ * the model has no known lookback bound.
6
+ */
7
+ export declare function resolvePromptCacheLookback(model: Model): number | undefined;
@@ -1,2 +1,2 @@
1
1
  /** Every chat-model provider with a catalog entry (`default-model` in its provider rules). */
2
- export type KnownProvider = "abliteration" | "aiand" | "aimlapi" | "alibaba-coding-plan" | "alibaba-token-plan" | "amazon-bedrock" | "anthropic" | "apple" | "azure" | "baseten" | "bedrock-mantle" | "cerebras" | "charm-hyper" | "cline-pass" | "cloudflare-ai-gateway" | "commandcode" | "coreweave" | "cursor" | "deepinfra" | "deepseek" | "devin" | "factory-droid" | "firepass" | "fireworks" | "github-copilot" | "gitlab-duo" | "gitlab-duo-agent" | "gmi-cloud" | "google" | "google-antigravity" | "google-gemini-cli" | "google-vertex" | "groq" | "helmcode" | "huggingface" | "kilo" | "kimi-code" | "litellm" | "lm-studio" | "local" | "meta" | "minimax" | "minimax-code" | "minimax-code-cn" | "mistral" | "moonshot" | "muse-code" | "nanogpt" | "novita" | "nvidia" | "ollama" | "ollama-cloud" | "openai" | "openai-codex" | "opencode-go" | "opencode-zen" | "openrouter" | "qianfan" | "qwen-portal" | "sakana" | "siliconflow" | "siliconflow-cn" | "singularityapi-dev" | "singularityapi-tech" | "snowflake" | "stepfun" | "synthetic" | "together" | "typesafe" | "umans" | "venice" | "vercel-ai-gateway" | "vllm" | "wafer-serverless" | "web" | "xai" | "xai-oauth" | "xiaomi" | "xiaomi-token-plan-ams" | "xiaomi-token-plan-cn" | "xiaomi-token-plan-sgp" | "yolo-auto" | "zai" | "zenmux" | "zhipu-coding-plan";
2
+ export type KnownProvider = "abliteration" | "aiand" | "aimlapi" | "alibaba-coding-plan" | "alibaba-token-plan" | "amazon-bedrock" | "anthropic" | "apple" | "azure" | "baseten" | "bedrock-mantle" | "cerebras" | "charm-hyper" | "cline-pass" | "cloudflare-ai-gateway" | "cloudflare-workers-ai" | "commandcode" | "coralbricks" | "coreweave" | "cursor" | "deepinfra" | "deepseek" | "devin" | "factory-droid" | "firepass" | "fireworks" | "github-copilot" | "gitlab-duo" | "gitlab-duo-agent" | "gmi-cloud" | "google" | "google-antigravity" | "google-gemini-cli" | "google-vertex" | "groq" | "helmcode" | "huggingface" | "kilo" | "kimi-code" | "litellm" | "lm-studio" | "local" | "meta" | "minimax" | "minimax-code" | "minimax-code-cn" | "mistral" | "moonshot" | "muse-code" | "nanogpt" | "novita" | "nvidia" | "ollama" | "ollama-cloud" | "openai" | "openai-codex" | "opencode-go" | "opencode-zen" | "openrouter" | "qianfan" | "qwen-portal" | "sakana" | "siliconflow" | "siliconflow-cn" | "singularityapi-dev" | "singularityapi-tech" | "snowflake" | "stepfun" | "synthetic" | "together" | "typesafe" | "umans" | "venice" | "vercel-ai-gateway" | "vllm" | "wafer-serverless" | "web" | "xai" | "xai-oauth" | "xiaomi" | "xiaomi-token-plan-ams" | "xiaomi-token-plan-cn" | "xiaomi-token-plan-sgp" | "yolo-auto" | "zai" | "zenmux" | "zhipu-coding-plan";
@@ -0,0 +1,21 @@
1
+ import type { ModelIdentity } from "./types.js";
2
+ /**
3
+ * The identity a deployment's reasoning is carried under, or `undefined` when
4
+ * the deployment's model family is not declared portable there. Class-only
5
+ * identities never qualify: they name a lineage, not a set of weights.
6
+ */
7
+ export declare function portableReasoningIdentity(provider: string, api: string, modelId: string): ModelIdentity | undefined;
8
+ /**
9
+ * Whether reasoning recorded on `source` may replay natively on `target`:
10
+ * both deployments declare the family portable and classify to the same
11
+ * class, family, and revision.
12
+ */
13
+ export declare function carriesReasoning(source: {
14
+ provider: string;
15
+ api: string;
16
+ model: string;
17
+ }, target: {
18
+ provider: string;
19
+ api: string;
20
+ id: string;
21
+ }): boolean;
@@ -0,0 +1,7 @@
1
+ import type { Model } from "../types.js";
2
+ /**
3
+ * Maximum encoded inline-image bytes retained per request for a deployment with a documented body-size limit.
4
+ * The axis is a host contract: a rerouted `baseUrl` (proxy, gateway) imposes its own limit, so the budget
5
+ * applies only while the model targets its official endpoint.
6
+ */
7
+ export declare function resolveInlineImageByteBudget(model: Model): number | undefined;
@@ -1,13 +1,3 @@
1
- /**
2
- * Runtime model-identity taxonomy: classifies wire model ids into
3
- * `(class, family, revision)` ranks, applies reviewed identity overrides, and
4
- * exposes the collapse/discovery vocabularies.
5
- *
6
- * Faithful port of the o2 reference (`taxonomy.rs` / `classify.rs`):
7
- * matchers rank `exact(4) > bounded(3) > namespace(2) > prefix(1) > glob(0)`
8
- * with token byte length as tiebreak; equal cross-class or cross-family ranks
9
- * throw unless classification is `lenient` (discovery normalization).
10
- */
11
1
  import type { Effort } from "../effort.js";
12
2
  import type { ModelIdentity } from "./types.js";
13
3
  /** Two classes, families, or reviewed override patterns tie for one model id. */
@@ -593,6 +593,8 @@ export interface CompiledSeedModel {
593
593
  baseUrl: string;
594
594
  reasoning: boolean;
595
595
  input: ("text" | "image")[];
596
+ /** Wire model id sent upstream when it differs from the row id (`request-model-id`). */
597
+ requestModelId?: string;
596
598
  supportsTools?: boolean;
597
599
  cost: TokenCost;
598
600
  contextWindow: number | null;
@@ -622,6 +624,8 @@ export interface CompiledProvider {
622
624
  id: string;
623
625
  /** Preferred model id when no explicit selection is made. */
624
626
  defaultModel: string;
627
+ /** Whether the provider participates in automatic default selection (defaults to true). */
628
+ automaticDefault?: boolean;
625
629
  /** Env vars consulted, in order, for the runtime API-key fallback. */
626
630
  envVars?: string[];
627
631
  /** The runtime creates a model manager even without a valid API key. */
@@ -63,13 +63,23 @@ export interface FetchAntigravityDiscoveryModelsOptions {
63
63
  */
64
64
  collapseTable?: VariantCollapseTable;
65
65
  }
66
+ /**
67
+ * A complete account roster, or a definitive 401/403 credential rejection.
68
+ * `null` from {@link fetchAntigravityDiscoveryModels} instead means a transient
69
+ * failure or invalid response, which must not replace an authoritative catalog.
70
+ */
71
+ export interface AntigravityModelDiscoveryResult {
72
+ models: ModelSpec<"google-gemini-cli">[];
73
+ rejectedStatus?: 401 | 403;
74
+ }
66
75
  /**
67
76
  * Fetches discoverable Antigravity models and normalizes them into canonical model entries.
68
77
  *
69
- * Returns `null` on network/payload/auth failures.
70
- * Returns `[]` only when the endpoint responds successfully with no usable models.
78
+ * Returns `null` on network, server, or payload failures; a 401/403 is reported
79
+ * separately so multi-account discovery can skip a rejected credential.
80
+ * A successful empty roster has `models: []` without `rejectedStatus`.
71
81
  */
72
- export declare function fetchAntigravityDiscoveryModels(options: FetchAntigravityDiscoveryModelsOptions): Promise<ModelSpec<"google-gemini-cli">[] | null>;
82
+ export declare function fetchAntigravityDiscoveryModels(options: FetchAntigravityDiscoveryModelsOptions): Promise<AntigravityModelDiscoveryResult | null>;
73
83
  /** Advertised image model and serving endpoint for one Antigravity account. */
74
84
  export interface AntigravityImageModel {
75
85
  id: string;
@@ -35,6 +35,22 @@ export interface ModelManagerOptions<TApi extends Api = Api, TModelsDevPayload =
35
35
  cacheTtlMs?: number;
36
36
  /** When true, a successful dynamic fetch is the complete provider catalog and prunes static-only models. */
37
37
  dynamicModelsAuthoritative?: boolean;
38
+ /**
39
+ * When true, a provider's dynamic rows are the deployment's whole truth
40
+ * for input modality: a live text-only row strips the bundled reference's
41
+ * image support instead of OR-merging it back. Declared by providers whose
42
+ * capability flags are authoritative and whose endpoints reject
43
+ * unsupported content (`github-copilot`, `deepinfra`, `coralbricks`).
44
+ */
45
+ dynamicInputAuthoritative?: boolean;
46
+ /** When true, live reasoning capability replaces the fallback, including an explicit false. */
47
+ dynamicReasoningAuthoritative?: boolean;
48
+ /**
49
+ * When true, a live per-million price replaces the fallback even when it is
50
+ * an explicit `0` (a free model or a dropped cache-write charge). Without it,
51
+ * a zero discovery price is treated as unknown and the bundled rate is kept.
52
+ */
53
+ dynamicCostAuthoritative?: boolean;
38
54
  /**
39
55
  * When true, a fresh cache never satisfies an online-eligible refresh: the
40
56
  * dynamic fetch always runs (an explicit `"offline"` strategy is still
@@ -0,0 +1,11 @@
1
+ import type { Api, ModelSpec } from "../types.js";
2
+ /**
3
+ * Merge per-account discovery catalogs into one list, deduped by model id.
4
+ *
5
+ * The first catalog to list an id supplies its spec; {@link ModelSpec.accountAccess}
6
+ * is merged from every catalog listing that id, so credential selection can
7
+ * route account-gated models to the accounts that serve them. Used by
8
+ * multi-account discovery for Codex and Antigravity, whose rosters differ per
9
+ * account.
10
+ */
11
+ export declare function unionAccountCatalogs<TApi extends Api>(catalogs: readonly (readonly ModelSpec<TApi>[])[]): ModelSpec<TApi>[];
@@ -11,8 +11,30 @@ export interface GoogleVertexModelManagerConfig {
11
11
  signal?: AbortSignal;
12
12
  fetch?: FetchImpl;
13
13
  }
14
+ /** One Antigravity OAuth account whose `fetchAvailableModels` roster discovery reads. */
15
+ export interface GoogleAntigravityAccount {
16
+ /** OAuth access token used for `Authorization: Bearer ...`. */
17
+ accessToken: string;
18
+ /**
19
+ * Credential identity recorded in {@link ModelSpec.accountAccess} for every
20
+ * model this account serves (see `oauthAccountKey` in `@linxiraos/pi-ai`).
21
+ * When any account lacks one, no model records per-account access.
22
+ */
23
+ accountKey?: string;
24
+ }
14
25
  export interface GoogleAntigravityModelManagerConfig {
15
- oauthToken?: string;
26
+ /**
27
+ * Resolves every configured Antigravity account at discovery time. Rosters
28
+ * are plan-scoped (Claude 5.5 is served to some accounts only) and
29
+ * authoritative, so each account's roster is fetched and the results are
30
+ * unioned; reading one account's roster would prune models only its
31
+ * siblings serve (#14924).
32
+ *
33
+ * Returns `null` to abort discovery (e.g. an account's credential failed to
34
+ * refresh), keeping the previous/bundled catalog instead of caching a
35
+ * partial one.
36
+ */
37
+ resolveAccounts?: () => Promise<readonly GoogleAntigravityAccount[] | null>;
16
38
  endpoint?: string;
17
39
  fetch?: FetchImpl;
18
40
  }
@@ -69,7 +69,7 @@ export interface OpenAIModelManagerConfig {
69
69
  baseUrl?: string;
70
70
  fetch?: FetchImpl;
71
71
  }
72
- export declare function openaiModelManagerOptions(config?: OpenAIModelManagerConfig): ModelManagerOptions<"openai-responses">;
72
+ export declare function openaiModelManagerOptions(config?: OpenAIModelManagerConfig): ModelManagerOptions<Api>;
73
73
  /**
74
74
  * Re-derive the generated pro-reasoning aliases (`gpt-5.6-*-pro`) for the
75
75
  * first-party `openai` gpt-5.6 rows. Each alias inherits the base row's
@@ -154,6 +154,19 @@ export interface DeepinfraModelManagerConfig {
154
154
  * model availability at runtime is still gated on credentials by the registry.
155
155
  */
156
156
  export declare function deepinfraModelManagerOptions(config?: DeepinfraModelManagerConfig): ModelManagerOptions<"openai-completions">;
157
+ export declare const CORALBRICKS_BASE_URL = "https://inference.coralbricks.ai/v1";
158
+ /** CoralBricks OpenAI-compatible discovery configuration. */
159
+ export interface CoralbricksModelManagerConfig {
160
+ apiKey?: string;
161
+ baseUrl?: string;
162
+ fetch?: FetchImpl;
163
+ }
164
+ /**
165
+ * Builds CoralBricks' model-discovery manager. `/v1/models` is key-protected
166
+ * (401 without a bearer key), so a keyless config serves only the bundled
167
+ * reviewed seed rows; with a key, live rows are authoritative over the bundle.
168
+ */
169
+ export declare function coralbricksModelManagerOptions(config?: CoralbricksModelManagerConfig): ModelManagerOptions<"openai-completions">;
157
170
  export interface XaiModelManagerConfig {
158
171
  apiKey?: string;
159
172
  baseUrl?: string;
@@ -339,6 +352,11 @@ export interface OpenRouterModelManagerConfig {
339
352
  baseUrl?: string;
340
353
  fetch?: FetchImpl;
341
354
  }
355
+ /**
356
+ * OpenRouter's Decisions API lives at `/api/alpha`, a sibling of the `/api/v1`
357
+ * chat root; derive it so a custom gateway base URL keeps both aligned.
358
+ */
359
+ export declare function openrouterDecisionsBaseUrl(chatBaseUrl: string): string;
342
360
  export declare function openrouterModelManagerOptions(config?: OpenRouterModelManagerConfig): ModelManagerOptions<Api>;
343
361
  export interface ZenMuxModelManagerConfig {
344
362
  apiKey?: string;
@@ -65,6 +65,8 @@ export declare function devinModelManagerOptions(config?: DevinModelManagerConfi
65
65
  export declare function factoryDroidModelManagerOptions(config?: FactoryDroidModelDiscoveryOptions): ModelManagerOptions<"factory-droid-agent">;
66
66
  export declare function localModelManagerOptions(): ModelManagerOptions<"local-inference">;
67
67
  export declare function webModelManagerOptions(): ModelManagerOptions<"web-search">;
68
+ /** Cloudflare Workers AI judges: the authored Clef rows; the account id resolves per request. */
69
+ export declare function cloudflareWorkersAiModelManagerOptions(): ModelManagerOptions<"workers-ai-systemone">;
68
70
  /** Credentials and endpoint overrides for the TypeSafe catalog manager. */
69
71
  export interface TypeSafeModelManagerConfig {
70
72
  apiKey?: string;
@@ -14,7 +14,23 @@ export type KindApiKind = (typeof KIND_API_KINDS)[number];
14
14
  /** Grounding transport available to chat models selected by the web role. */
15
15
  export type WebSearchGrounding = "gemini" | "anthropic" | "codex" | "xai" | "openrouter" | "openai";
16
16
  /** Non-chat runner protocols accepted by catalog seeds, outside the chat dispatch union. */
17
- export declare const RUNNER_APIS: readonly ["local-inference", "web-search", "typesafe", "openrouter-decisions", "openai-images", "openrouter-images", "xai-tts", "openai-speech", "openai-embeddings", "openrouter-rerank", "openrouter-video", "openai-transcriptions"];
17
+ export declare const RUNNER_APIS: readonly ["local-inference", "web-search", "typesafe", "openrouter-decisions", "openai-decisions", "workers-ai-systemone", "openai-images", "openrouter-images", "xai-tts", "openai-speech", "openai-embeddings", "openrouter-rerank", "openrouter-video", "openai-transcriptions"];
18
+ /** Kind each single-purpose runner API serves; `local-inference` hosts several kinds. */
19
+ export declare const RUNNER_API_KINDS: Record<Exclude<(typeof RUNNER_APIS)[number], "local-inference">, ModelKind>;
20
+ /** Kind a runner API serves; `undefined` for chat transports and multi-kind `local-inference`. */
21
+ export declare function runnerApiKind(api: Api): ModelKind | undefined;
22
+ /** Catalog APIs `generate_image` runs through a pi-ai image client; the hosted Responses pair needs a carrier model. */
23
+ export declare const IMAGE_GENERATION_APIS: readonly ["openai-images", "openrouter-images", "google-generative-ai", "google-gemini-cli", "openai-responses", "openai-codex-responses"];
24
+ export type ImageGenerationApi = (typeof IMAGE_GENERATION_APIS)[number];
25
+ /**
26
+ * Kinds a model on `api` may declare: a runner api serves its own kind; a chat
27
+ * transport serves `chat` and `tiny`, plus `image` when `generate_image` runs it
28
+ * (hosted Responses image tool, Gemini image models). `undefined` for
29
+ * `local-inference`, which hosts several kinds chosen by the model itself.
30
+ */
31
+ export declare function servedKinds(api: Api): readonly ModelKind[] | undefined;
32
+ /** Whether a model of `kind` can run on `api`. */
33
+ export declare function apiServesKind(api: Api, kind: ModelKind): boolean;
18
34
  /** Resolve a model's kind while preserving chat semantics for existing catalog rows. */
19
35
  export declare function modelKind(model: Pick<Model, "kind">): ModelKind;
20
36
  /** Canonical thinking transport used by a model. */
@@ -176,6 +192,8 @@ export interface OpenAICompat {
176
192
  supportsMultipleSystemMessages?: boolean;
177
193
  /** Whether the provider supports `reasoning_effort`. Default: auto-detected from URL. */
178
194
  supportsReasoningEffort?: boolean;
195
+ /** Do not infer a thinking dial when discovery supplies no explicit thinking configuration. */
196
+ trustExplicitThinkingOnly?: boolean;
179
197
  /** Optional mapping from pi-ai reasoning levels to provider/model-specific `reasoning_effort` values. */
180
198
  reasoningEffortMap?: Partial<Record<Effort, string>>;
181
199
  /** Whether the provider supports `stream_options: { include_usage: true }` for token usage in streaming responses. Default: true. */
@@ -322,6 +340,8 @@ export interface OpenAICompat {
322
340
  extraBody?: Record<string, unknown>;
323
341
  /** Request-session header that should mirror the normalized prompt-cache key. Default: unset. */
324
342
  promptCacheSessionHeader?: "x-grok-conv-id";
343
+ /** Request header carrying the conversation session id, independent of prompt caching. Default: unset. */
344
+ sessionHeader?: "x-litellm-session-id";
325
345
  /** Whether chat-completions payloads should include provider-specific prompt-cache markers. */
326
346
  cacheControlFormat?: "anthropic" | undefined;
327
347
  /**
@@ -405,8 +425,8 @@ export interface OpenAICompat {
405
425
  /**
406
426
  * Whether the Responses endpoint accepts `configuration_update` input items
407
427
  * that change `reasoning.effort` mid-conversation while the request-level
408
- * effort stays pinned for prompt caching (GPT-6 Astra). Default:
409
- * rule-detected (`true` for `gpt-6-astra` on any host, `false` otherwise).
428
+ * effort stays pinned for prompt caching (GPT-6 family). Default:
429
+ * rule-detected (`true` for GPT-6 models on any host, `false` otherwise).
410
430
  * Set `false` for custom `openai-responses` / `openai-codex-responses`
411
431
  * endpoints that reject the item type with HTTP 400; effort changes are then
412
432
  * sent as the top-level `reasoning.effort`.
@@ -603,12 +623,31 @@ export interface AnthropicCompat {
603
623
  injectClaudeCodeInstruction?: boolean;
604
624
  /** Strip image inputs before encoding (text-only serving of a multimodal id). */
605
625
  stripImageInput?: boolean;
626
+ /**
627
+ * Largest width or height a single image block may carry. The canonical
628
+ * Anthropic API rejects anything larger with `At least one of the image
629
+ * dimensions exceed max allowed size: 8000 pixels`, and the rejection
630
+ * poisons every retry and model fallback because the block stays in
631
+ * context, so the request builder downscales to this value first. Hosts
632
+ * with a different image contract override it. Default: 8000.
633
+ */
634
+ maxImageDimension?: number;
635
+ /**
636
+ * Largest base64 payload a single image block may carry, in bytes. The
637
+ * canonical Anthropic API measures the encoded string, not the decoded
638
+ * bytes (`image exceeds 10 MB maximum: 14012300 bytes > 10485760 bytes`),
639
+ * and an image inside {@link maxImageDimension} can still cross it, so
640
+ * payload size is clamped on its own. Hosts with a different image
641
+ * contract override it. Default: 10485760.
642
+ */
643
+ maxImagePayloadBytes?: number;
606
644
  /** Thinking-loop watchdog guard family applied to streamed reasoning. */
607
645
  thinkingLoopGuard?: "gemini" | "deepseek" | "xai";
608
646
  /**
609
647
  * Drop the enabled `thinking` config and replayed thinking blocks when the
610
648
  * conversation is not thinking-led (a proxy contract for non-interleaved
611
- * budget models). Default: false.
649
+ * budget models), and replay history without thinking blocks on every turn
650
+ * that sends `thinking: { type: "disabled" }`. Default: false.
612
651
  */
613
652
  stripThinkingHistory?: boolean;
614
653
  /**
@@ -618,10 +657,15 @@ export interface AnthropicCompat {
618
657
  effortBeta?: boolean;
619
658
  /**
620
659
  * Wire form of a disabled-thinking turn: omit the field, send
621
- * `{ type: "disabled" }`, or keep adaptive thinking. Unset keeps the
622
- * direct-provider behavior.
660
+ * `{ type: "disabled" }`, keep adaptive thinking, or send
661
+ * `{ type: "between_tools" }`. Unset keeps the direct-provider behavior.
662
+ */
663
+ disabledThinking?: "omit" | "disabled" | "adaptive" | "between-tools";
664
+ /**
665
+ * `output_config.effort` pinned on a `between_tools` turn. Unset leaves
666
+ * the turn's effort untouched.
623
667
  */
624
- disabledThinking?: "omit" | "disabled" | "adaptive";
668
+ betweenToolsEffort?: "low" | "medium" | "high";
625
669
  /** The model is a fast-mode SKU: send `speed: "fast"` with the fast-mode beta. Default: false. */
626
670
  fastMode?: boolean;
627
671
  }
@@ -630,6 +674,8 @@ export interface AnthropicCompat {
630
674
  * deliberately not used to infer these request-shape capabilities.
631
675
  */
632
676
  export interface BedrockCompat {
677
+ /** Explicit disabled-thinking wire form; unset preserves the provider's existing behavior. */
678
+ disabledThinking?: AnthropicCompat["disabledThinking"];
633
679
  /** Whether this endpoint accepts no checkpoints, automatic caching, or explicit cachePoint blocks. */
634
680
  promptCacheMode?: "none" | "automatic" | "explicit";
635
681
  /** Whether this wire may revise already-streamed text (`stream-revision` axis). Unassigned: append-only. */
@@ -665,9 +711,19 @@ export interface BedrockCompat {
665
711
  * choices to `auto` when this is false. Default: true.
666
712
  */
667
713
  supportsForcedToolChoice?: boolean;
714
+ /**
715
+ * Whether the endpoint accepts thinking-binding controls (`thinking.block_binding`,
716
+ * the `thinking-binding-controls-2026-08-01` beta and the `/input_transformations`
717
+ * response path) on prefix-bound models. Only consulted when
718
+ * `thinking.prefixBinding` is set; `false` omits the controls while keeping the
719
+ * local prefix-binding safeguards. Default: true.
720
+ */
721
+ supportsThinkingBindingControls?: boolean;
668
722
  }
669
723
  /** Fully-resolved Bedrock Converse prompt-cache capabilities, materialized once by `buildModel`. */
670
724
  export interface ResolvedBedrockCompat {
725
+ /** See {@link BedrockCompat.disabledThinking}. */
726
+ disabledThinking?: BedrockCompat["disabledThinking"];
671
727
  promptCacheMode: NonNullable<BedrockCompat["promptCacheMode"]>;
672
728
  /** See {@link BedrockCompat.streamRevision}. */
673
729
  streamRevision?: BedrockCompat["streamRevision"];
@@ -677,6 +733,8 @@ export interface ResolvedBedrockCompat {
677
733
  /** See {@link BedrockCompat.supportsSamplingParams}. */
678
734
  supportsSamplingParams?: boolean;
679
735
  supportsForcedToolChoice: boolean;
736
+ /** See {@link BedrockCompat.supportsThinkingBindingControls}. */
737
+ supportsThinkingBindingControls: boolean;
680
738
  /**
681
739
  * Stream-watchdog idle-timeout fallback in ms for hosts with no keepalive
682
740
  * events; 0 disables the idle watchdog. Undefined defers to
@@ -722,6 +780,7 @@ export interface ResolvedOpenAISharedCompat {
722
780
  supportsDeveloperRole: boolean;
723
781
  supportsStrictMode: boolean;
724
782
  supportsReasoningEffort: boolean;
783
+ trustExplicitThinkingOnly?: boolean;
725
784
  reasoningEffortMap: Partial<Record<Effort, string>>;
726
785
  supportsReasoningParams: boolean;
727
786
  supportsSamplingParams: boolean;
@@ -764,6 +823,7 @@ export interface ResolvedOpenAISharedCompat {
764
823
  emptyLengthFinishIsContextError: boolean;
765
824
  usesOpenAIToolCallIdLimit: boolean;
766
825
  promptCacheSessionHeader?: OpenAICompat["promptCacheSessionHeader"];
826
+ sessionHeader?: OpenAICompat["sessionHeader"];
767
827
  /**
768
828
  * Whether this model accepts explicit OpenAI prompt-cache breakpoints.
769
829
  * Built catalog models always materialize this false-by-default value;
@@ -798,7 +858,7 @@ export interface ResolvedOpenAISharedCompat {
798
858
  * `buildModel`; request handlers read fields and never detect, resolve, or
799
859
  * allocate.
800
860
  */
801
- export type ResolvedOpenAICompat = ResolvedOpenAISharedCompat & Required<Omit<OpenAICompat, "supportsDeveloperRole" | "supportsReasoningEffort" | "reasoningEffortMap" | "supportsReasoningParams" | "supportsReasoningSummary" | "statefulResponses" | "supportsSamplingParams" | "supportsPenaltyAndStopParams" | "thinkingFormat" | "kimiApiFormat" | "reasoningDisableMode" | "omitReasoningEffort" | "includeEncryptedReasoning" | "filterReasoningHistory" | "disableReasoningOnForcedToolChoice" | "disableReasoningOnToolChoice" | "disableReasoningWithTools" | "supportsToolChoice" | "supportsForcedToolChoice" | "supportsNamedToolChoice" | "reasoningContentField" | "mistralReasoningContentParts" | "requiresReasoningContentForToolCalls" | "requiresReasoningContentForAllAssistantTurns" | "allowsSyntheticReasoningContentForToolCalls" | "syntheticReasoningContentFallback" | "replayReasoningContent" | "qwenPreserveThinking" | "qwenTemplateReasoningEffort" | "requiresThinkingAsText" | "requiresMistralToolIds" | "requiresToolResultName" | "requiresAssistantAfterToolResult" | "requiresAssistantContentForToolCalls" | "stripDeepseekSpecialTokens" | "streamMarkupHealingPattern" | "reasoningDeltasMayBeCumulative" | "emptyLengthFinishIsContextError" | "usesOpenAIToolCallIdLimit" | "promptCacheSessionHeader" | "supportsPromptCacheBreakpoints" | "promptCacheBreakpointTtl" | "openRouterRouting" | "isOpenRouterHost" | "supportsStrictMode" | "supportsLongPromptCacheRetention" | "alwaysSendMaxTokens" | "clampOutputToModelMax" | "wireModelIdMode" | "vercelGatewayRouting" | "extraBody" | "toolStrictMode" | "toolSchemaFlavor" | "streamFirstEventTimeoutMs" | "streamIdleTimeoutMs" | "streamRevision" | "cacheControlFormat" | "thinkingKeep" | "strictResponsesPairing" | "supportsImageDetailOriginal" | "supportsConfigurationUpdate" | "supportsSteering" | "stripImageInput" | "thinkingLoopGuard" | "whenThinking">> & {
861
+ export type ResolvedOpenAICompat = ResolvedOpenAISharedCompat & Required<Omit<OpenAICompat, "supportsDeveloperRole" | "supportsReasoningEffort" | "trustExplicitThinkingOnly" | "reasoningEffortMap" | "supportsReasoningParams" | "supportsReasoningSummary" | "statefulResponses" | "supportsSamplingParams" | "supportsPenaltyAndStopParams" | "thinkingFormat" | "kimiApiFormat" | "reasoningDisableMode" | "omitReasoningEffort" | "includeEncryptedReasoning" | "filterReasoningHistory" | "disableReasoningOnForcedToolChoice" | "disableReasoningOnToolChoice" | "disableReasoningWithTools" | "supportsToolChoice" | "supportsForcedToolChoice" | "supportsNamedToolChoice" | "reasoningContentField" | "mistralReasoningContentParts" | "requiresReasoningContentForToolCalls" | "requiresReasoningContentForAllAssistantTurns" | "allowsSyntheticReasoningContentForToolCalls" | "syntheticReasoningContentFallback" | "replayReasoningContent" | "qwenPreserveThinking" | "qwenTemplateReasoningEffort" | "requiresThinkingAsText" | "requiresMistralToolIds" | "requiresToolResultName" | "requiresAssistantAfterToolResult" | "requiresAssistantContentForToolCalls" | "stripDeepseekSpecialTokens" | "streamMarkupHealingPattern" | "reasoningDeltasMayBeCumulative" | "emptyLengthFinishIsContextError" | "usesOpenAIToolCallIdLimit" | "promptCacheSessionHeader" | "sessionHeader" | "supportsPromptCacheBreakpoints" | "promptCacheBreakpointTtl" | "openRouterRouting" | "isOpenRouterHost" | "supportsStrictMode" | "supportsLongPromptCacheRetention" | "alwaysSendMaxTokens" | "clampOutputToModelMax" | "wireModelIdMode" | "vercelGatewayRouting" | "extraBody" | "toolStrictMode" | "toolSchemaFlavor" | "streamFirstEventTimeoutMs" | "streamIdleTimeoutMs" | "streamRevision" | "cacheControlFormat" | "thinkingKeep" | "strictResponsesPairing" | "supportsImageDetailOriginal" | "supportsConfigurationUpdate" | "supportsSteering" | "stripImageInput" | "thinkingLoopGuard" | "whenThinking">> & {
802
862
  vercelGatewayRouting?: OpenAICompat["vercelGatewayRouting"];
803
863
  extraBody?: OpenAICompat["extraBody"];
804
864
  cacheControlFormat?: OpenAICompat["cacheControlFormat"];
@@ -828,8 +888,8 @@ export interface ResolvedOpenAIResponsesCompat extends ResolvedOpenAISharedCompa
828
888
  /**
829
889
  * Whether a `configuration_update` input item may change `reasoning.effort`
830
890
  * mid-conversation while the request-level effort stays byte-stable for
831
- * prompt caching. Rule-owned: GPT-6 Astra only; every other model rejects
832
- * the item type with 400.
891
+ * prompt caching. Rule-owned: the GPT-6 family; earlier models do not
892
+ * support the item type.
833
893
  */
834
894
  supportsConfigurationUpdate: boolean;
835
895
  /**
@@ -855,6 +915,13 @@ export interface ResolvedOpenAIResponsesCompat extends ResolvedOpenAISharedCompa
855
915
  * `PI_MUSE_STORE_RESPONSES`); stored runs retain prompts and outputs on the provider.
856
916
  */
857
917
  storeResponses: boolean;
918
+ /**
919
+ * Whether the host binds native history items (`encrypted_content`, item
920
+ * ids) to the connection that issued them, so a new process must rebuild
921
+ * prior turns from message content until its first successful response.
922
+ * Rule-owned: GitHub Copilot.
923
+ */
924
+ connectionBoundNativeHistory: boolean;
858
925
  streamIdleTimeoutMs?: number;
859
926
  vercelGatewayRouting?: OpenAICompat["vercelGatewayRouting"];
860
927
  /** The model sits behind Vercel AI Gateway's Responses endpoint. */
@@ -878,15 +945,28 @@ export interface ResolvedOpenAIResponsesCompat extends ResolvedOpenAISharedCompa
878
945
  */
879
946
  export type ResolvedOpenRouterCompat = ResolvedOpenAICompat & ResolvedOpenAIResponsesCompat;
880
947
  /** Fully-resolved anthropic-messages compat view (same contract as `ResolvedOpenAICompat`). */
881
- export type ResolvedAnthropicCompat = Required<Omit<AnthropicCompat, "streamIdleTimeoutMs" | "thinkingLoopGuard" | "bedrockMessagesApi" | "effortBeta" | "disabledThinking" | "stripThinkingHistory" | "fastMode">> & {
948
+ export type ResolvedAnthropicCompat = Required<Omit<AnthropicCompat, "streamIdleTimeoutMs" | "thinkingLoopGuard" | "bedrockMessagesApi" | "effortBeta" | "disabledThinking" | "betweenToolsEffort" | "stripThinkingHistory" | "fastMode" | "maxImageDimension" | "maxImagePayloadBytes">> & {
882
949
  /** Effort-beta override; undefined keeps the transport's legacy heuristic. */
883
950
  effortBeta?: AnthropicCompat["effortBeta"];
884
951
  /** Disabled-thinking wire form; undefined keeps the direct-provider behavior. */
885
952
  disabledThinking?: AnthropicCompat["disabledThinking"];
886
- /** Strip thinking history on non-thinking-led turns; undefined behaves as false. */
953
+ /** Effort pinned on `between_tools` turns; undefined leaves effort untouched. */
954
+ betweenToolsEffort?: AnthropicCompat["betweenToolsEffort"];
955
+ /** Strip thinking history on non-thinking-led and disabled-thinking turns; undefined behaves as false. */
887
956
  stripThinkingHistory?: AnthropicCompat["stripThinkingHistory"];
888
957
  /** Fast-mode SKU; undefined behaves as false. */
889
958
  fastMode?: AnthropicCompat["fastMode"];
959
+ /**
960
+ * Largest width or height a single image block may carry. Undefined defers
961
+ * to the canonical Anthropic API limit applied by the request builder.
962
+ */
963
+ maxImageDimension?: number;
964
+ /**
965
+ * Largest base64 image payload a single block may carry, in bytes.
966
+ * Undefined defers to the canonical Anthropic API limit applied by the
967
+ * request builder.
968
+ */
969
+ maxImagePayloadBytes?: number;
890
970
  /** Thinking-loop watchdog guard family applied to streamed reasoning. */
891
971
  thinkingLoopGuard?: AnthropicCompat["thinkingLoopGuard"];
892
972
  /**
@@ -1090,6 +1170,12 @@ export interface Model<TApi extends Api = Api> {
1090
1170
  id: string;
1091
1171
  /** Role-specific runner capability; omitted for ordinary chat models. */
1092
1172
  kind?: ModelKind;
1173
+ /**
1174
+ * Verbatim configured kind (models.yml, `modelOverrides`, runtime
1175
+ * registrations). `buildModel` applies it over catalog `kind` rules on every
1176
+ * rebuild, so a configured runner keeps its role.
1177
+ */
1178
+ kindConfig?: ModelKind;
1093
1179
  /** Grounding transport supported by this chat model. */
1094
1180
  webSearch?: WebSearchGrounding;
1095
1181
  /** Cheaper same-provider model to run hosted web search in this model's place (model id or provider/id). */
@@ -1187,11 +1273,11 @@ export interface Model<TApi extends Api = Api> {
1187
1273
  cursorMaxModeRoutes?: Readonly<Record<string, boolean>>;
1188
1274
  /**
1189
1275
  * Per-account availability recorded by multi-account discovery: provider
1190
- * account id (Codex: ChatGPT `chatgpt_account_id`) → that account's
1191
- * entitlements on this model. An account appears only when its own catalog
1192
- * lists the model, so credential selection can route account-gated models
1193
- * (e.g. `gpt-daybreak-blue-latest`) straight to eligible accounts. Absent on
1194
- * bundled/config rows and on single-account discovery.
1276
+ * account key (Codex: ChatGPT `chatgpt_account_id`; Antigravity: login
1277
+ * email) → that account's entitlements on this model. An account appears
1278
+ * only when its own catalog lists the model, so credential selection can
1279
+ * route account-gated models (e.g. `gpt-daybreak-blue-latest`, Antigravity
1280
+ * Claude 5.5) straight to eligible accounts. Absent on bundled/config rows.
1195
1281
  */
1196
1282
  accountAccess?: Readonly<Record<string, ModelAccountAccess>>;
1197
1283
  /** Cursor `RequestedModel.parameters` for this model's default variant. */
@@ -1302,9 +1388,9 @@ export interface Model<TApi extends Api = Api> {
1302
1388
  /**
1303
1389
  * Per-service-tier cost multipliers baked from the `service-tier-cost`
1304
1390
  * catalog axis (e.g. `{ priority: 2.5 }`). Absent tiers use the API-generic
1305
- * defaults.
1391
+ * defaults, and a tier with no published price stays at 1x.
1306
1392
  */
1307
- serviceTierCost?: Readonly<Partial<Record<"flex" | "priority", number>>>;
1393
+ serviceTierCost?: Readonly<Partial<Record<"flex" | "priority" | "ultrafast", number>>>;
1308
1394
  /**
1309
1395
  * Provider-supplied one-line blurb for this model. Set only when an upstream
1310
1396
  * ships one (Devin's `GetCliModelConfigs`); never synthesized locally.
@@ -1314,7 +1400,7 @@ export interface Model<TApi extends Api = Api> {
1314
1400
  isNew?: boolean;
1315
1401
  /** Upstream marks this model as beta / preview quality. */
1316
1402
  isBeta?: boolean;
1317
- /** Authenticated provider catalog marks this as the account's default model. */
1403
+ /** Authenticated catalog marks this as the account's default; the startup pick prefers it over `default-model`. */
1318
1404
  isProviderDefault?: boolean;
1319
1405
  /** Upstream marks this model as one of its recommended picks. */
1320
1406
  isRecommended?: boolean;
@@ -6,13 +6,3 @@ export declare const CLOUDFLARE_AI_GATEWAY_ANTHROPIC_BASE_URL = "https://gateway
6
6
  export declare const CLOUDFLARE_AI_GATEWAY_OPENAI_BASE_URL = "https://gateway.ai.cloudflare.com/v1/<account>/<gateway>/openai";
7
7
  /** OpenAI-compatible Workers AI endpoint. */
8
8
  export declare const CLOUDFLARE_AI_GATEWAY_COMPAT_BASE_URL = "https://gateway.ai.cloudflare.com/v1/<account>/<gateway>/compat";
9
- /** Opaque API-key credential payload persisted by Cloudflare AI Gateway login. */
10
- export interface CloudflareAiGatewayCredential {
11
- token: string;
12
- accountId?: string;
13
- gatewayId?: string;
14
- }
15
- /** Parse both structured login credentials and legacy plain gateway tokens. */
16
- export declare function parseCloudflareAiGatewayCredential(value: string): CloudflareAiGatewayCredential | null;
17
- /** Serialize the gateway token with the routing identifiers collected during login. */
18
- export declare function serializeCloudflareAiGatewayCredential(token: string, accountId: string, gatewayId: string): string;
@@ -0,0 +1,10 @@
1
+ /** Cloudflare credential persisted by the AI Gateway and Workers AI logins: a bearer token plus the routing ids collected at login. */
2
+ export interface CloudflareCredential {
3
+ token: string;
4
+ accountId?: string;
5
+ gatewayId?: string;
6
+ }
7
+ /** Parses a structured login credential or a legacy plain token; null when empty or malformed. */
8
+ export declare function parseCloudflareCredential(value: string): CloudflareCredential | null;
9
+ /** Serializes a login credential, trimming fields and omitting empty optional ids. */
10
+ export declare function serializeCloudflareCredential(credential: CloudflareCredential): string;
@@ -3,7 +3,7 @@
3
3
  * native request corpus with `packages/ai/scripts/capture-factory-droid-native.ts`
4
4
  * against the matching CLI binary and make `factory-droid-native-parity.test.ts` pass.
5
5
  */
6
- export declare const FACTORY_DROID_CLIENT_VERSION = "0.230.0";
6
+ export declare const FACTORY_DROID_CLIENT_VERSION = "0.237.0";
7
7
  /** Wire protocols the Factory proxy multiplexes; `api-routes provider="factory-droid"` picks one per model. */
8
8
  export declare const FACTORY_DROID_WIRES: readonly ["openai-completions", "openai-responses", "anthropic-messages", "google-generate"];
9
9
  /** Wire protocol used by the Factory proxy for each model. */