@oh-my-pi/pi-catalog 18.12.3 → 18.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/types/compat/auth-ids.d.ts +2 -2
- package/dist/types/compat/image-tokenization.d.ts +13 -1
- package/dist/types/compat/provider-ids.d.ts +1 -1
- package/dist/types/compat/request-size.d.ts +11 -6
- package/dist/types/discovery/devin.d.ts +1 -1
- package/dist/types/hosts.d.ts +3 -1
- package/dist/types/provider-models/openai-compat.d.ts +7 -0
- package/dist/types/types.d.ts +10 -3
- package/dist/types/wire/devin.d.ts +1 -15
- package/package.json +4 -4
- package/src/compat/auth-ids.ts +2 -0
- package/src/compat/axes.ts +18 -2
- package/src/compat/image-tokenization.ts +55 -1
- package/src/compat/provider-ids.ts +1 -0
- package/src/compat/request-size.ts +18 -8
- package/src/compat/resolve.ts +1 -0
- package/src/compat/rules/README.md +6 -2
- package/src/compat/rules/auth/_order.kdl +1 -1
- package/src/compat/rules/auth/inception.kdl +11 -0
- package/src/compat/rules/classes/anthropic.kdl +23 -21
- package/src/compat/rules/classes/deepseek.kdl +31 -0
- package/src/compat/rules/providers/amazon-bedrock.kdl +56 -0
- package/src/compat/rules/providers/factory-droid.kdl +12 -0
- package/src/compat/rules/providers/inception.kdl +61 -0
- package/src/compat/rules.json +1 -1
- package/src/discovery/devin.ts +33 -66
- package/src/hosts.ts +5 -2
- package/src/models.json +1 -1
- package/src/provider-models/descriptors.ts +2 -0
- package/src/provider-models/openai-compat.ts +44 -2
- package/src/types.ts +10 -3
- package/src/wire/devin.ts +16 -20
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [18.12.4] - 2026-10-20
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added native Inception support with Mercury 3, Mercury 2.5, and Mercury 2, live chat-model discovery, API-key login, reasoning controls, and Mercury 3 launch pricing while its catalog reports none; Mercury 3 waits up to 10 minutes for its first output, since high-effort reasoning streams nothing ([#16439](https://github.com/can1357/oh-my-pi/pull/16439) by [@eggpeat](https://github.com/eggpeat))
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Changed Devin model discovery to send legacy Windsurf Enterprise keys unprefixed in one request, dropping the Windsurf-editor retry that returned a smaller model list ([#13677](https://github.com/can1357/oh-my-pi/pull/13677) by [@will-bogusz](https://github.com/will-bogusz))
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- Factory Droid now carries Droid's 3.5 MB inline-image budget (`inline-image-byte-budget`) for its hosted routes, under their 4.5 MB request limit, and the new `request-body-byte-limit` axis (`resolveRequestBodyByteLimit`) records that limit; it applies on Factory's own hosts through pi-ai's `reachesBudgetedHost` ([#16288](https://github.com/can1357/oh-my-pi/pull/16288) by [@will-bogusz](https://github.com/will-bogusz))
|
|
18
|
+
- DeepSeek V4.1 Flash images are now priced by DeepSeek's own billing (994 tokens for a snapcompact frame) instead of a GPT or Claude rate (2,882 to 3,136), so a 25-frame archive no longer counts about 50k tokens the provider never bills and triggers compaction early ([#16418](https://github.com/can1357/oh-my-pi/pull/16418) by [@will-bogusz](https://github.com/will-bogusz))
|
|
19
|
+
- Fixed Amazon Bedrock Kimi K3 (`global.`/`us.moonshotai.kimi-k3`) offering Anthropic-style thinking budgets it ignores; it now offers `low`, `high` and `max` effort, defaulting to `max` ([#13697](https://github.com/can1357/oh-my-pi/pull/13697) by [@alblez](https://github.com/alblez))
|
|
20
|
+
- Marked supported Bedrock Claude models as eligible for native compaction ([#16343](https://github.com/can1357/oh-my-pi/pull/16343) by [@anatoli-tsinovoy](https://github.com/anatoli-tsinovoy))
|
|
21
|
+
|
|
5
22
|
## [18.12.3] - 2026-10-19
|
|
6
23
|
|
|
7
24
|
### Changed
|
|
@@ -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" | "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" | "sambanova" | "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" | "inception" | "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" | "sambanova" | "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" | "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" | "sambanova" | "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" | "inception" | "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" | "sambanova" | "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";
|
|
@@ -22,6 +22,18 @@ export interface OpenAiPatchTokenization {
|
|
|
22
22
|
/** The level `auto` (and an omitted `detail`) sizes like. */
|
|
23
23
|
auto: "high" | "original";
|
|
24
24
|
}
|
|
25
|
+
/** DeepSeek ViT patches merged `downsample`² into one token, plus a newline per row and two delimiters. */
|
|
26
|
+
export interface DeepSeekPatchTokenization {
|
|
27
|
+
regime: "deepseek-patch";
|
|
28
|
+
/** ViT patch edge in pixels. */
|
|
29
|
+
patchSize: number;
|
|
30
|
+
/** Patches merged per token along each axis. */
|
|
31
|
+
downsample: number;
|
|
32
|
+
/** Token budget per image, layout tokens included. */
|
|
33
|
+
maxTokens: number;
|
|
34
|
+
/** Smaller images are upscaled to this pixel area. */
|
|
35
|
+
minPixels: number;
|
|
36
|
+
}
|
|
25
37
|
/** One model line's image billing rule: the vendor formula and its per-model numbers. */
|
|
26
38
|
export type ImageTokenization = (OpenAiPatchTokenization
|
|
27
39
|
/** Anthropic 28px patches, resized to fit a padded-edge limit and a visual-token budget. */
|
|
@@ -29,7 +41,7 @@ export type ImageTokenization = (OpenAiPatchTokenization
|
|
|
29
41
|
regime: "anthropic-patch";
|
|
30
42
|
maxEdge: number;
|
|
31
43
|
maxTokens: number;
|
|
32
|
-
}
|
|
44
|
+
} | DeepSeekPatchTokenization
|
|
33
45
|
/** A fixed per-image budget regardless of pixels (Gemini 3 `media_resolution`). */
|
|
34
46
|
| {
|
|
35
47
|
regime: "fixed";
|
|
@@ -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" | "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" | "sambanova" | "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" | "inception" | "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" | "sambanova" | "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,15 +2,20 @@ import type { Model } from "../types.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* Maximum encoded inline-image bytes retained per request for a deployment with a documented body-size limit.
|
|
4
4
|
* The axis is a host contract: a rerouted endpoint (proxy, gateway) imposes its own limit, so the budget applies
|
|
5
|
-
* only when `
|
|
6
|
-
*
|
|
5
|
+
* only when `budgetedHost` says the request reaches the host the rules describe: pi-ai's `reachesBudgetedHost`
|
|
6
|
+
* (the model's official endpoint, following request-time reroutes, or Factory's hosted API for a Factory Droid model).
|
|
7
7
|
*/
|
|
8
|
-
export declare function resolveInlineImageByteBudget(model: Model,
|
|
8
|
+
export declare function resolveInlineImageByteBudget(model: Model, budgetedHost: boolean): number | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Largest request body the deployment accepts (`request-body-byte-limit`), or `undefined` when no rule names it.
|
|
11
|
+
* Same gate as {@link resolveInlineImageByteBudget}.
|
|
12
|
+
*/
|
|
13
|
+
export declare function resolveRequestBodyByteLimit(model: Model, budgetedHost: boolean): number | undefined;
|
|
9
14
|
/**
|
|
10
15
|
* Most images one request to this deployment may carry, or `undefined` when no rule names the host. A configured
|
|
11
16
|
* `model.imageCountBudget` wins: the user knows the host behind a custom gateway. Otherwise the
|
|
12
|
-
* `official-image-count-budget` axis replaces `image-count-budget` only when `
|
|
13
|
-
* reaches the
|
|
17
|
+
* `official-image-count-budget` axis replaces `image-count-budget` only when `budgetedHost` says the request
|
|
18
|
+
* reaches the host the rules describe (see {@link resolveInlineImageByteBudget}); a rerouted endpoint keeps the
|
|
14
19
|
* provider's generic budget.
|
|
15
20
|
*/
|
|
16
|
-
export declare function resolveImageCountBudget(model: Model,
|
|
21
|
+
export declare function resolveImageCountBudget(model: Model, budgetedHost: boolean): number | undefined;
|
|
@@ -3,7 +3,7 @@ import type { FetchImpl, ModelSpec } from "../types.js";
|
|
|
3
3
|
* Options for fetching dynamic Devin (Codeium Cascade) models from `GetCliModelConfigs`.
|
|
4
4
|
*/
|
|
5
5
|
export interface DevinModelDiscoveryOptions {
|
|
6
|
-
/**
|
|
6
|
+
/** Stored Devin credential; encoded into protobuf `Metadata.apiKey` by shape. */
|
|
7
7
|
apiKey?: string;
|
|
8
8
|
/** Optional Codeium API base URL override. */
|
|
9
9
|
baseUrl?: string;
|
package/dist/types/hosts.d.ts
CHANGED
|
@@ -175,11 +175,13 @@ export declare function isAzureDeploymentsUrl(baseUrl: string): boolean;
|
|
|
175
175
|
* - `anthropic`: the Anthropic Messages API under `/anthropic`.
|
|
176
176
|
* - `openai`: the OpenAI-compatible APIs under `/openai`, plus Mantle's
|
|
177
177
|
* documented `/v1` base (`https://bedrock-mantle.<region>.api.aws/v1`).
|
|
178
|
+
* - `runtime`: the bedrock-runtime origin itself, where Converse and
|
|
179
|
+
* InvokeModel live under `/model/<id>/…`.
|
|
178
180
|
*
|
|
179
181
|
* Hostnames are parsed strictly so proxies that embed these hosts in a path
|
|
180
182
|
* do not match.
|
|
181
183
|
*/
|
|
182
|
-
export declare function isBedrockRouteUrl(baseUrl: string | undefined, route: "openai" | "anthropic"): boolean;
|
|
184
|
+
export declare function isBedrockRouteUrl(baseUrl: string | undefined, route: "openai" | "anthropic" | "runtime"): boolean;
|
|
183
185
|
/** Amazon Bedrock's OpenAI-compatible routes; see {@link isBedrockRouteUrl}. */
|
|
184
186
|
export declare function isBedrockOpenAIUrl(baseUrl: string | undefined): boolean;
|
|
185
187
|
/** Alibaba DashScope consumer `compatible-mode` endpoint (rejects multimodal arrays for some text-only SKUs). */
|
|
@@ -419,6 +419,13 @@ export interface TogetherModelManagerConfig {
|
|
|
419
419
|
fetch?: FetchImpl;
|
|
420
420
|
}
|
|
421
421
|
export declare function togetherModelManagerOptions(config?: TogetherModelManagerConfig): ModelManagerOptions<"openai-completions">;
|
|
422
|
+
/**
|
|
423
|
+
* Builds Inception's authenticated model-discovery manager. A successful
|
|
424
|
+
* `/v1/models` fetch is the complete roster, keeping only rows that advertise
|
|
425
|
+
* `chat.completions` (the shared roster also lists FIM/edit and Decisions-only
|
|
426
|
+
* models); without an API key the bundled Mercury seeds are served.
|
|
427
|
+
*/
|
|
428
|
+
export declare function inceptionModelManagerOptions(config?: ModelManagerConfig): ModelManagerOptions<"openai-completions">;
|
|
422
429
|
export interface CoreWeaveModelManagerConfig {
|
|
423
430
|
apiKey?: string;
|
|
424
431
|
baseUrl?: string;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -688,8 +688,8 @@ export interface AnthropicCompat {
|
|
|
688
688
|
fastMode?: boolean;
|
|
689
689
|
}
|
|
690
690
|
/**
|
|
691
|
-
* Compatibility settings for Bedrock Converse
|
|
692
|
-
*
|
|
691
|
+
* Compatibility settings for Bedrock Converse requests and native streaming
|
|
692
|
+
* side-compaction. Cache pricing does not imply these capabilities.
|
|
693
693
|
*/
|
|
694
694
|
export interface BedrockCompat {
|
|
695
695
|
/** Explicit disabled-thinking wire form; unset preserves the provider's existing behavior. */
|
|
@@ -737,8 +737,13 @@ export interface BedrockCompat {
|
|
|
737
737
|
* local prefix-binding safeguards. Default: true.
|
|
738
738
|
*/
|
|
739
739
|
supportsThinkingBindingControls?: boolean;
|
|
740
|
+
/**
|
|
741
|
+
* Whether the model supports a compaction-only Bedrock Runtime
|
|
742
|
+
* InvokeModelWithResponseStream request. Ordinary turns still use Converse.
|
|
743
|
+
*/
|
|
744
|
+
supportsServerCompaction?: boolean;
|
|
740
745
|
}
|
|
741
|
-
/** Fully-resolved Bedrock Converse
|
|
746
|
+
/** Fully-resolved Bedrock Converse and side-compaction capabilities, materialized once by `buildModel`. */
|
|
742
747
|
export interface ResolvedBedrockCompat {
|
|
743
748
|
/** See {@link BedrockCompat.disabledThinking}. */
|
|
744
749
|
disabledThinking?: BedrockCompat["disabledThinking"];
|
|
@@ -753,6 +758,8 @@ export interface ResolvedBedrockCompat {
|
|
|
753
758
|
supportsForcedToolChoice: boolean;
|
|
754
759
|
/** See {@link BedrockCompat.supportsThinkingBindingControls}. */
|
|
755
760
|
supportsThinkingBindingControls: boolean;
|
|
761
|
+
/** See {@link BedrockCompat.supportsServerCompaction}; false unless the Bedrock model-card policy opts in. */
|
|
762
|
+
supportsServerCompaction: boolean;
|
|
756
763
|
/**
|
|
757
764
|
* Stream-watchdog idle-timeout fallback in ms for hosts with no keepalive
|
|
758
765
|
* events; 0 disables the idle watchdog. Undefined defers to
|
|
@@ -6,23 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
/** Base host for Codeium/Windsurf's Cascade API (Connect protocol over HTTP/1.1). */
|
|
8
8
|
export declare const DEVIN_DEFAULT_BASE_URL = "https://server.codeium.com";
|
|
9
|
-
/** Session token as the wire format carries it: the scheme prefix is required. */
|
|
10
|
-
export declare function normalizeDevinSessionToken(apiKey: string | undefined): string;
|
|
11
|
-
/** Released-CLI metadata with credential bytes already encoded for the wire. */
|
|
12
|
-
export declare function devinWireMetadata(apiKey: string | undefined, userJwt?: string): {
|
|
13
|
-
ideName: "devin-cli";
|
|
14
|
-
ideType: "chisel";
|
|
15
|
-
ideVersion: "3000.11.3";
|
|
16
|
-
extensionName: "chisel";
|
|
17
|
-
extensionVersion: "3000.11.3";
|
|
18
|
-
locale: "en";
|
|
19
|
-
os: "darwin" | "linux" | "windows";
|
|
20
|
-
apiKey: string;
|
|
21
|
-
userJwt: string;
|
|
22
|
-
};
|
|
23
9
|
/**
|
|
24
10
|
* Fields for `Metadata` on released-CLI calls (`GetUserJwt`, `AssignModel`,
|
|
25
|
-
* `GetChatMessage`, `GetUserStatus`)
|
|
11
|
+
* `GetChatMessage`, `GetUserStatus`).
|
|
26
12
|
*/
|
|
27
13
|
export declare function devinCliMetadata(apiKey: string | undefined, userJwt?: string): {
|
|
28
14
|
ideName: "devin-cli";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oh-my-pi/pi-catalog",
|
|
3
|
-
"version": "18.12.
|
|
3
|
+
"version": "18.12.4",
|
|
4
4
|
"description": "Model catalog for omp: bundled model database, provider discovery descriptors, model identity, classification, and equivalence",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -93,12 +93,12 @@
|
|
|
93
93
|
"gen:proto": "bun scripts/generate-protocols.ts"
|
|
94
94
|
},
|
|
95
95
|
"dependencies": {
|
|
96
|
-
"@oh-my-pi/omptype": "18.12.
|
|
97
|
-
"@oh-my-pi/pi-utils": "18.12.
|
|
96
|
+
"@oh-my-pi/omptype": "18.12.4",
|
|
97
|
+
"@oh-my-pi/pi-utils": "18.12.4"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
100
|
"@bgotink/kdl": "0.4.0",
|
|
101
|
-
"@oh-my-pi/pi-ai": "18.12.
|
|
101
|
+
"@oh-my-pi/pi-ai": "18.12.4",
|
|
102
102
|
"@types/bun": "^1.3.14"
|
|
103
103
|
},
|
|
104
104
|
"engines": {
|
package/src/compat/auth-ids.ts
CHANGED
|
@@ -40,6 +40,7 @@ export type AuthProviderId =
|
|
|
40
40
|
| "groq"
|
|
41
41
|
| "helmcode"
|
|
42
42
|
| "huggingface"
|
|
43
|
+
| "inception"
|
|
43
44
|
| "kagi"
|
|
44
45
|
| "kilo"
|
|
45
46
|
| "kimi-code"
|
|
@@ -132,6 +133,7 @@ export type LoginProviderId =
|
|
|
132
133
|
| "google-gemini-cli"
|
|
133
134
|
| "helmcode"
|
|
134
135
|
| "huggingface"
|
|
136
|
+
| "inception"
|
|
135
137
|
| "kagi"
|
|
136
138
|
| "kilo"
|
|
137
139
|
| "kimi-code"
|
package/src/compat/axes.ts
CHANGED
|
@@ -267,7 +267,7 @@ export const AXES: Readonly<Record<string, AxisDef>> = {
|
|
|
267
267
|
"supports-mid-conversation-system": wire("supportsMidConversationSystem", ["anthropic"]),
|
|
268
268
|
"supports-mid-conversation-tool-changes": wire("supportsMidConversationToolChanges", ["anthropic"]),
|
|
269
269
|
"supports-per-message-effort": wire("supportsPerMessageEffort", ["anthropic"]),
|
|
270
|
-
"supports-server-compaction": wire("supportsServerCompaction", ["anthropic"]),
|
|
270
|
+
"supports-server-compaction": wire("supportsServerCompaction", ["anthropic", "bedrock"]),
|
|
271
271
|
"supports-between-tools-thinking": wire("supportsBetweenToolsThinking", ["anthropic"]),
|
|
272
272
|
"supports-thinking-binding-controls": wire("supportsThinkingBindingControls", ["anthropic", "bedrock"]),
|
|
273
273
|
"supports-turn-scoped-system": wire("supportsTurnScopedSystem", ["anthropic"]),
|
|
@@ -477,7 +477,7 @@ export const AXES: Readonly<Record<string, AxisDef>> = {
|
|
|
477
477
|
"image-count-budget": { key: "imageCountBudget", set: "catalog", shape: "scalar" },
|
|
478
478
|
/**
|
|
479
479
|
* Replaces `image-count-budget` while the request reaches the official
|
|
480
|
-
* endpoint (pi-ai `
|
|
480
|
+
* endpoint (pi-ai `reachesBudgetedHost`): a limit measured or documented
|
|
481
481
|
* for the host's own endpoint, which a custom `baseUrl` or an
|
|
482
482
|
* `ANTHROPIC_BASE_URL`/`FOUNDRY_BASE_URL` reroute (proxy, gateway) need not share.
|
|
483
483
|
*/
|
|
@@ -493,6 +493,22 @@ export const AXES: Readonly<Record<string, AxisDef>> = {
|
|
|
493
493
|
/** Longest image edge the host passes to the model: it downscales larger images to fit first. */
|
|
494
494
|
"image-max-edge": { key: "imageMaxEdge", set: "catalog", shape: "scalar" },
|
|
495
495
|
"inline-image-byte-budget": { key: "inlineImageByteBudget", set: "catalog", shape: "scalar" },
|
|
496
|
+
/**
|
|
497
|
+
* Largest request body the host accepts. Where set, the inline-image byte clamp keeps the newest user message's
|
|
498
|
+
* and newest tool result's images past `inline-image-byte-budget` while they alone fit this limit.
|
|
499
|
+
*/
|
|
500
|
+
"request-body-byte-limit": { key: "requestBodyByteLimit", set: "catalog", shape: "scalar" },
|
|
501
|
+
/**
|
|
502
|
+
* Opt-in: the host budgets above apply whenever the request reaches the provider's own catalog endpoint
|
|
503
|
+
* (`endpoint-hosts`, or an unset `baseUrl`), for a hosted gateway whose compat names no official endpoint.
|
|
504
|
+
* Unassigned: they apply only on the official endpoint (pi-ai `reachesOfficialEndpoint`).
|
|
505
|
+
*/
|
|
506
|
+
"catalog-endpoint-budgets": {
|
|
507
|
+
key: "catalogEndpointBudgets",
|
|
508
|
+
set: "catalog",
|
|
509
|
+
shape: "scalar",
|
|
510
|
+
values: [true, false],
|
|
511
|
+
},
|
|
496
512
|
/**
|
|
497
513
|
* Supported formats and size bounds for judgment-request images; `mime-types`
|
|
498
514
|
* is comma-separated because object payloads have no array shape.
|
|
@@ -36,11 +36,25 @@ export interface OpenAiPatchTokenization {
|
|
|
36
36
|
auto: "high" | "original";
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
/** DeepSeek ViT patches merged `downsample`² into one token, plus a newline per row and two delimiters. */
|
|
40
|
+
export interface DeepSeekPatchTokenization {
|
|
41
|
+
regime: "deepseek-patch";
|
|
42
|
+
/** ViT patch edge in pixels. */
|
|
43
|
+
patchSize: number;
|
|
44
|
+
/** Patches merged per token along each axis. */
|
|
45
|
+
downsample: number;
|
|
46
|
+
/** Token budget per image, layout tokens included. */
|
|
47
|
+
maxTokens: number;
|
|
48
|
+
/** Smaller images are upscaled to this pixel area. */
|
|
49
|
+
minPixels: number;
|
|
50
|
+
}
|
|
51
|
+
|
|
39
52
|
/** One model line's image billing rule: the vendor formula and its per-model numbers. */
|
|
40
53
|
export type ImageTokenization = (
|
|
41
54
|
| OpenAiPatchTokenization
|
|
42
55
|
/** Anthropic 28px patches, resized to fit a padded-edge limit and a visual-token budget. */
|
|
43
56
|
| { regime: "anthropic-patch"; maxEdge: number; maxTokens: number }
|
|
57
|
+
| DeepSeekPatchTokenization
|
|
44
58
|
/** A fixed per-image budget regardless of pixels (Gemini 3 `media_resolution`). */
|
|
45
59
|
| { regime: "fixed"; tokens: number }
|
|
46
60
|
) & {
|
|
@@ -54,7 +68,10 @@ const UNCLASSIFIED: Pick<ModelIdentity, "class"> = { class: "unknown" };
|
|
|
54
68
|
function isImageTokenization(value: unknown): value is ImageTokenization {
|
|
55
69
|
return (
|
|
56
70
|
isRecord(value) &&
|
|
57
|
-
(value.regime === "openai-patch" ||
|
|
71
|
+
(value.regime === "openai-patch" ||
|
|
72
|
+
value.regime === "anthropic-patch" ||
|
|
73
|
+
value.regime === "deepseek-patch" ||
|
|
74
|
+
value.regime === "fixed")
|
|
58
75
|
);
|
|
59
76
|
}
|
|
60
77
|
|
|
@@ -169,6 +186,41 @@ function anthropicTokens(size: ImageSize, maxEdge: number, maxTokens: number): n
|
|
|
169
186
|
return patches(lo, short(lo));
|
|
170
187
|
}
|
|
171
188
|
|
|
189
|
+
/**
|
|
190
|
+
* DeepSeek visual tokens: the image is upscaled to `minPixels`, padded to
|
|
191
|
+
* whole patches, and when its token grid busts `maxTokens` shrunk to the
|
|
192
|
+
* largest aspect-preserving grid that fits. Port of `plan_image_grid` in the
|
|
193
|
+
* reference processor (`max_wh_ratio` is unset in the V4.1 config):
|
|
194
|
+
* <https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash/blob/main/inference/image_processor.py>
|
|
195
|
+
*/
|
|
196
|
+
function deepseekTokens(size: ImageSize, rule: DeepSeekPatchTokenization): number {
|
|
197
|
+
const { patchSize, downsample, maxTokens, minPixels } = rule;
|
|
198
|
+
const cell = patchSize * downsample;
|
|
199
|
+
const spanTokens = (height: number, width: number) => {
|
|
200
|
+
const rows = Math.ceil(Math.floor(height / patchSize) / downsample);
|
|
201
|
+
const cols = Math.ceil(Math.floor(width / patchSize) / downsample);
|
|
202
|
+
return rows * (cols + 1) + 2;
|
|
203
|
+
};
|
|
204
|
+
let { width, height } = size;
|
|
205
|
+
if (width * height < minPixels) {
|
|
206
|
+
const scale = Math.sqrt(minPixels / (width * height));
|
|
207
|
+
width = Math.trunc(width * scale);
|
|
208
|
+
height = Math.trunc(height * scale);
|
|
209
|
+
}
|
|
210
|
+
const tokens = spanTokens(Math.ceil(height / patchSize) * patchSize, Math.ceil(width / patchSize) * patchSize);
|
|
211
|
+
if (tokens <= maxTokens) return tokens;
|
|
212
|
+
const aspect = height / width;
|
|
213
|
+
const maxCols = Math.sqrt((maxTokens - 2) / aspect + 0.25) - 0.5;
|
|
214
|
+
const maxRows = maxCols * aspect;
|
|
215
|
+
if (maxCols < 1) return spanTokens(Math.floor((maxTokens - 2) / 2) * cell, cell);
|
|
216
|
+
if (maxRows < 1) return spanTokens(cell, (maxTokens - 3) * cell);
|
|
217
|
+
const beta = Math.min((Math.floor(maxCols) * cell) / width, (Math.floor(maxRows) * cell) / height);
|
|
218
|
+
return spanTokens(
|
|
219
|
+
Math.floor((height * beta) / patchSize) * patchSize,
|
|
220
|
+
Math.floor((width * beta) / patchSize) * patchSize,
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
|
|
172
224
|
/** Billed input tokens for one image of `size` under `rule`; only `openai-patch` reads `detail`. */
|
|
173
225
|
export function imageTokens(rule: ImageTokenization, size: ImageSize, detail?: ImageDetail): number {
|
|
174
226
|
switch (rule.regime) {
|
|
@@ -180,5 +232,7 @@ export function imageTokens(rule: ImageTokenization, size: ImageSize, detail?: I
|
|
|
180
232
|
}
|
|
181
233
|
case "anthropic-patch":
|
|
182
234
|
return anthropicTokens(size, rule.maxEdge, rule.maxTokens);
|
|
235
|
+
case "deepseek-patch":
|
|
236
|
+
return deepseekTokens(size, rule);
|
|
183
237
|
}
|
|
184
238
|
}
|
|
@@ -9,11 +9,11 @@ const IMAGE_BUDGET_CACHE_MAX = 8192;
|
|
|
9
9
|
/**
|
|
10
10
|
* Maximum encoded inline-image bytes retained per request for a deployment with a documented body-size limit.
|
|
11
11
|
* The axis is a host contract: a rerouted endpoint (proxy, gateway) imposes its own limit, so the budget applies
|
|
12
|
-
* only when `
|
|
13
|
-
*
|
|
12
|
+
* only when `budgetedHost` says the request reaches the host the rules describe: pi-ai's `reachesBudgetedHost`
|
|
13
|
+
* (the model's official endpoint, following request-time reroutes, or Factory's hosted API for a Factory Droid model).
|
|
14
14
|
*/
|
|
15
|
-
export function resolveInlineImageByteBudget(model: Model,
|
|
16
|
-
if (!
|
|
15
|
+
export function resolveInlineImageByteBudget(model: Model, budgetedHost: boolean): number | undefined {
|
|
16
|
+
if (!budgetedHost) return undefined;
|
|
17
17
|
const key = `${model.provider} ${model.id} ${model.api}`;
|
|
18
18
|
let budget = imageBudgetCache.get(key);
|
|
19
19
|
if (budget === undefined) {
|
|
@@ -25,16 +25,26 @@ export function resolveInlineImageByteBudget(model: Model, officialEndpoint: boo
|
|
|
25
25
|
return budget ?? undefined;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Largest request body the deployment accepts (`request-body-byte-limit`), or `undefined` when no rule names it.
|
|
30
|
+
* Same gate as {@link resolveInlineImageByteBudget}.
|
|
31
|
+
*/
|
|
32
|
+
export function resolveRequestBodyByteLimit(model: Model, budgetedHost: boolean): number | undefined {
|
|
33
|
+
if (!budgetedHost) return undefined;
|
|
34
|
+
const value = resolveCatalogPolicy(model).requestBodyByteLimit;
|
|
35
|
+
return typeof value === "number" && Number.isFinite(value) && value > 0 ? value : undefined;
|
|
36
|
+
}
|
|
37
|
+
|
|
28
38
|
/**
|
|
29
39
|
* Most images one request to this deployment may carry, or `undefined` when no rule names the host. A configured
|
|
30
40
|
* `model.imageCountBudget` wins: the user knows the host behind a custom gateway. Otherwise the
|
|
31
|
-
* `official-image-count-budget` axis replaces `image-count-budget` only when `
|
|
32
|
-
* reaches the
|
|
41
|
+
* `official-image-count-budget` axis replaces `image-count-budget` only when `budgetedHost` says the request
|
|
42
|
+
* reaches the host the rules describe (see {@link resolveInlineImageByteBudget}); a rerouted endpoint keeps the
|
|
33
43
|
* provider's generic budget.
|
|
34
44
|
*/
|
|
35
|
-
export function resolveImageCountBudget(model: Model,
|
|
45
|
+
export function resolveImageCountBudget(model: Model, budgetedHost: boolean): number | undefined {
|
|
36
46
|
if (model.imageCountBudget !== undefined) return model.imageCountBudget;
|
|
37
47
|
const policy = resolveCatalogPolicy(model);
|
|
38
|
-
const value = (
|
|
48
|
+
const value = (budgetedHost && policy.officialImageCountBudget) || policy.imageCountBudget;
|
|
39
49
|
return typeof value === "number" && Number.isInteger(value) && value > 0 ? value : undefined;
|
|
40
50
|
}
|
package/src/compat/resolve.ts
CHANGED
|
@@ -952,6 +952,7 @@ function resolveBedrockPolicy(spec: ModelSpec<"bedrock-converse-stream">, axes:
|
|
|
952
952
|
// no-checkpoint shape.
|
|
953
953
|
const compat: ResolvedBedrockCompat = {
|
|
954
954
|
promptCacheMode: "none",
|
|
955
|
+
supportsServerCompaction: false,
|
|
955
956
|
supportsLongPromptCacheRetention: false,
|
|
956
957
|
promptCacheMinimumTokens: 0,
|
|
957
958
|
promptCacheMaximumCheckpoints: 0,
|
|
@@ -225,9 +225,13 @@ One object axis carries a computed form: `long-context-cost` accepts either the
|
|
|
225
225
|
|
|
226
226
|
`max-tokens-fallback` seeds `maxTokens` only when the row reports none, and `max-tokens-ceiling` lowers a larger reported `maxTokens` to the host's output cap (an unknown budget stays unknown unless a fallback seeded it). Both apply in `buildModel` after `limits-patch`, so discovery mappers pass upstream output budgets through verbatim. See the Kimi rules in [`providers/fireworks.kdl`](providers/fireworks.kdl).
|
|
227
227
|
|
|
228
|
-
`inline-image-byte-budget` caps retained base64 image characters for a deployment's request body. It leaves room for tool schemas and text beneath the provider's body-size limit; the coding agent reads it through `resolveInlineImageByteBudget` before sending live history, and snapcompact gives its archive frames half of it (`frameDataBytesBudget`). The budget applies only while the request reaches the
|
|
228
|
+
`inline-image-byte-budget` caps retained base64 image characters for a deployment's request body. It leaves room for tool schemas and text beneath the provider's body-size limit; the coding agent reads it through `resolveInlineImageByteBudget` before sending live history, and snapcompact gives its archive frames half of it (`frameDataBytesBudget`). The budget applies only while the request reaches the host the rules describe (the Anthropic API, first-party OpenAI, the Codex backend at its default URL, or Factory Droid's own global or EU API host), which callers decide with pi-ai's `reachesBudgetedHost`: `compat.officialEndpoint` for the configured `baseUrl`, for first-party Anthropic models also the `ANTHROPIC_BASE_URL` or Foundry `FOUNDRY_BASE_URL` reroute applied at request time, and for Factory Droid models the `baseUrl` origin. A custom or rerouted endpoint imposes its own body limit.
|
|
229
229
|
|
|
230
|
-
`
|
|
230
|
+
`request-body-byte-limit` is the largest request body the host accepts (Factory Droid's hosted routes: 4,500,000 bytes), under the same gate. Where it is set, the byte clamp keeps the inline images of the newest user message and then of the newest image-bearing tool result even past `inline-image-byte-budget`, each only while the kept images fit the limit less the request's other serialized bytes, and evicts older images instead; read through `resolveRequestBodyByteLimit`.
|
|
231
|
+
|
|
232
|
+
`catalog-endpoint-budgets #true` makes these host budgets apply whenever a request reaches the provider's own catalog endpoint (an unset `baseUrl`, or an `endpoint-hosts` host; see `isCatalogEndpointUrl`), for a hosted gateway such as Factory Droid whose compat names no official endpoint. Unassigned, they apply only on the official endpoint.
|
|
233
|
+
|
|
234
|
+
`image-count-budget` is the most images one request may carry, archive frames, screenshots and imaged tool results combined. The coding agent reads it through `resolveImageCountBudget`, drops the oldest images past it, and caps snapcompact frames at it; unassigned hosts get a floor of 5. `official-image-count-budget` replaces it while the request reaches the host the rules describe (same gate as `inline-image-byte-budget`), for limits established on the host's own endpoint (Anthropic: 600, 100 on 200k-window models; Codex: 2,000); a custom or rerouted endpoint keeps `image-count-budget` (Anthropic 90, Codex 200).
|
|
231
235
|
|
|
232
236
|
`endpoint-hosts` lists the HTTPS hostnames a provider serves besides its bundled base URL's host, such as Copilot's per-plan `api.<plan>.githubcopilot.com` hosts. That host plus these define the provider's own endpoint (`isCatalogEndpointUrl`), which separates first-party traffic from a custom model or provider override that keeps a catalog provider id but points `baseUrl` at a gateway, proxy, or local server. Connection prewarming and request compression act only on the provider's own endpoint.
|
|
233
237
|
|
|
@@ -5,7 +5,7 @@ login-order "openai-codex" "anthropic" "zai" "zai-coding-plan" "kimi-code" "open
|
|
|
5
5
|
"cursor" "devin" "google-antigravity" "google-gemini-cli" "openai-codex-device" "xai" "xai-oauth" \
|
|
6
6
|
"gitlab-duo" "gitlab-duo-agent" "alibaba-coding-plan" "alibaba-token-plan" "aiand" "abliteration" "zhipu-coding-plan" \
|
|
7
7
|
"umans" "qwen-portal" "sakana" "sambanova" "minimax-code" "minimax-code-cn" "xiaomi" "xiaomi-token-plan-sgp" \
|
|
8
|
-
"xiaomi-token-plan-ams" "xiaomi-token-plan-cn" "firepass" "cline-pass" "factory-droid" "commandcode" "charm-hyper" "deepseek" "stepfun" "muse-code" "meta" "moonshot" \
|
|
8
|
+
"xiaomi-token-plan-ams" "xiaomi-token-plan-cn" "firepass" "cline-pass" "factory-droid" "commandcode" "charm-hyper" "deepseek" "stepfun" "muse-code" "meta" "moonshot" "inception" \
|
|
9
9
|
"cerebras" "baseten" "helmcode" "fireworks" "together" "nvidia" "novita" "deepinfra" "huggingface" "perplexity" \
|
|
10
10
|
"qianfan" "venice" "siliconflow" "siliconflow-cn" "synthetic" "nanogpt" "wafer-serverless" "coreweave" \
|
|
11
11
|
"vercel-ai-gateway" "cloudflare-ai-gateway" "cloudflare-workers-ai" "snowflake" "litellm" "kilo" "zenmux" "opencode-zen" "opencode-go" \
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
auth "inception" {
|
|
2
|
+
name "Inception"
|
|
3
|
+
login "api-key" {
|
|
4
|
+
auth-url "https://platform.inceptionlabs.ai/dashboard/api-keys"
|
|
5
|
+
instructions "Create or copy your key from the Inception dashboard"
|
|
6
|
+
prompt "Paste your Inception API key" placeholder="sk_..."
|
|
7
|
+
// Validate against inference, not /models: Inception's models endpoints
|
|
8
|
+
// are public and answer 200 for any key. Costs a few tokens.
|
|
9
|
+
validate "chat-completions" label="Inception" base-url="https://api.inceptionlabs.ai/v1" model="mercury-3" max-tokens-field="max_completion_tokens"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -163,34 +163,36 @@ class "anthropic" {
|
|
|
163
163
|
// Foundry / Claude Platform on AWS are first-party Anthropic routes whose
|
|
164
164
|
// effective URLs are checked at request time.
|
|
165
165
|
on "anthropic" "google-vertex" "amazon-bedrock" "bedrock-mantle" {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
on-api "anthropic-messages" {
|
|
167
|
+
family "fable" {
|
|
168
|
+
revision ">=5" {
|
|
169
|
+
supports-server-compaction #true
|
|
170
|
+
}
|
|
169
171
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
family "mythos" {
|
|
173
|
+
revision ">=5" {
|
|
174
|
+
supports-server-compaction #true
|
|
175
|
+
}
|
|
174
176
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
177
|
+
family "opus" {
|
|
178
|
+
revision ">=4.6" {
|
|
179
|
+
supports-server-compaction #true
|
|
180
|
+
}
|
|
179
181
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
182
|
+
family "sonnet" {
|
|
183
|
+
revision ">=4.6" {
|
|
184
|
+
supports-server-compaction #true
|
|
185
|
+
}
|
|
184
186
|
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
family "haiku" {
|
|
188
|
+
revision ">=5.5 <6" {
|
|
189
|
+
supports-server-compaction #true
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
models "claude-mythos-preview" {
|
|
188
193
|
supports-server-compaction #true
|
|
189
194
|
}
|
|
190
195
|
}
|
|
191
|
-
models "claude-mythos-preview" {
|
|
192
|
-
supports-server-compaction #true
|
|
193
|
-
}
|
|
194
196
|
}
|
|
195
197
|
// Sonnet 4.5 and newer end generation with `model_context_window_exceeded`
|
|
196
198
|
// when prompt + max_tokens overruns the window, instead of a 400, so the
|
|
@@ -108,4 +108,35 @@ class "deepseek" {
|
|
|
108
108
|
revision ">=4" {
|
|
109
109
|
portable-reasoning #true
|
|
110
110
|
}
|
|
111
|
+
// V4.1 Flash's vision config (patch 14, 3x3 merge, 1024-token cap, 544²
|
|
112
|
+
// floor). verified: OpenRouter billing matched it exactly on Fireworks and
|
|
113
|
+
// DeepInfra and within one token on Together, 256px to 4000px.
|
|
114
|
+
// Later Flash releases stay on their wire fallback until measured.
|
|
115
|
+
family "flash" {
|
|
116
|
+
revision ">=4.1 <4.2" {
|
|
117
|
+
image-tokenization {
|
|
118
|
+
regime "deepseek-patch"
|
|
119
|
+
verified #true
|
|
120
|
+
patch-size 14
|
|
121
|
+
downsample 3
|
|
122
|
+
max-tokens 1024
|
|
123
|
+
min-pixels 295936
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
// DeepSeek's API retired the V4.0 vision preview and serves its legacy id
|
|
128
|
+
// with the current Flash (api-docs.deepseek.com/guides/vision); hosts that
|
|
129
|
+
// still run the preview keep their fallback.
|
|
130
|
+
on "deepseek" {
|
|
131
|
+
models "deepseek-v4-flash-vision-exp" {
|
|
132
|
+
image-tokenization {
|
|
133
|
+
regime "deepseek-patch"
|
|
134
|
+
verified #true
|
|
135
|
+
patch-size 14
|
|
136
|
+
downsample 3
|
|
137
|
+
max-tokens 1024
|
|
138
|
+
min-pixels 295936
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
111
142
|
}
|