@oh-my-pi/pi-catalog 18.9.0 → 18.9.2
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 +12 -0
- package/dist/types/compat/auth-ids.d.ts +2 -2
- package/dist/types/compat/judgment-questions.d.ts +7 -0
- package/dist/types/compat/provider-ids.d.ts +1 -1
- package/dist/types/compat/types.d.ts +2 -0
- package/dist/types/provider-models/openai-compat.d.ts +1 -1
- package/dist/types/provider-models/special.d.ts +2 -0
- package/dist/types/types.d.ts +11 -1
- package/dist/types/wire/cloudflare-ai-gateway.d.ts +0 -10
- package/dist/types/wire/cloudflare.d.ts +10 -0
- package/package.json +4 -4
- package/src/compat/auth-ids.ts +2 -0
- package/src/compat/axes.ts +6 -1
- package/src/compat/judgment-questions.ts +12 -0
- package/src/compat/provider-ids.ts +1 -0
- package/src/compat/resolve.ts +3 -0
- package/src/compat/rules/README.md +3 -1
- package/src/compat/rules/auth/_order.kdl +1 -1
- package/src/compat/rules/auth/cloudflare-workers-ai.kdl +9 -0
- package/src/compat/rules/classes/qwen.kdl +2 -1
- package/src/compat/rules/providers/cloudflare-workers-ai.kdl +34 -0
- package/src/compat/rules/providers/groq.kdl +21 -0
- package/src/compat/rules/providers/judgment-questions.kdl +53 -0
- package/src/compat/rules/providers/openai.kdl +15 -0
- package/src/compat/rules.json +1 -1
- package/src/compat/types.ts +2 -0
- package/src/models.json +1 -1
- package/src/provider-models/descriptors.ts +2 -0
- package/src/provider-models/openai-compat.ts +26 -2
- package/src/provider-models/special.ts +9 -0
- package/src/types.ts +14 -0
- package/src/wire/cloudflare-ai-gateway.ts +0 -36
- package/src/wire/cloudflare.ts +40 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [18.9.2] - 2026-10-11
|
|
6
|
+
|
|
7
|
+
### Removed
|
|
8
|
+
|
|
9
|
+
- Removed `parseCloudflareAiGatewayCredential`, `serializeCloudflareAiGatewayCredential`, and `CloudflareAiGatewayCredential` from `@oh-my-pi/pi-catalog/wire/cloudflare-ai-gateway`. Use the equivalents from `@oh-my-pi/pi-catalog/wire/cloudflare` instead.
|
|
10
|
+
|
|
11
|
+
## [18.9.1] - 2026-10-11
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Added the `supports-thinking-binding-controls` axis to Bedrock Converse models (on by default) so a rule or `models.yml` override can turn off Claude thinking-binding controls on hosts that reject them ([#15316](https://github.com/can1357/oh-my-pi/pull/15316) by [@harshaygadekar](https://github.com/harshaygadekar))
|
|
16
|
+
|
|
5
17
|
## [18.9.0] - 2026-10-11
|
|
6
18
|
|
|
7
19
|
### Fixed
|
|
@@ -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" | "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";
|
|
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" | "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";
|
|
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;
|
|
@@ -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" | "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";
|
|
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";
|
|
@@ -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;
|
|
@@ -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<
|
|
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
|
|
@@ -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;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ 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
18
|
/** Kind each single-purpose runner API serves; `local-inference` hosts several kinds. */
|
|
19
19
|
export declare const RUNNER_API_KINDS: Record<Exclude<(typeof RUNNER_APIS)[number], "local-inference">, ModelKind>;
|
|
20
20
|
/** Kind a runner API serves; `undefined` for chat transports and multi-kind `local-inference`. */
|
|
@@ -711,6 +711,14 @@ export interface BedrockCompat {
|
|
|
711
711
|
* choices to `auto` when this is false. Default: true.
|
|
712
712
|
*/
|
|
713
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;
|
|
714
722
|
}
|
|
715
723
|
/** Fully-resolved Bedrock Converse prompt-cache capabilities, materialized once by `buildModel`. */
|
|
716
724
|
export interface ResolvedBedrockCompat {
|
|
@@ -725,6 +733,8 @@ export interface ResolvedBedrockCompat {
|
|
|
725
733
|
/** See {@link BedrockCompat.supportsSamplingParams}. */
|
|
726
734
|
supportsSamplingParams?: boolean;
|
|
727
735
|
supportsForcedToolChoice: boolean;
|
|
736
|
+
/** See {@link BedrockCompat.supportsThinkingBindingControls}. */
|
|
737
|
+
supportsThinkingBindingControls: boolean;
|
|
728
738
|
/**
|
|
729
739
|
* Stream-watchdog idle-timeout fallback in ms for hosts with no keepalive
|
|
730
740
|
* events; 0 disables the idle watchdog. Undefined defers to
|
|
@@ -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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oh-my-pi/pi-catalog",
|
|
3
|
-
"version": "18.9.
|
|
3
|
+
"version": "18.9.2",
|
|
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.9.
|
|
97
|
-
"@oh-my-pi/pi-utils": "18.9.
|
|
96
|
+
"@oh-my-pi/omptype": "18.9.2",
|
|
97
|
+
"@oh-my-pi/pi-utils": "18.9.2"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
100
|
"@bgotink/kdl": "0.4.0",
|
|
101
|
-
"@oh-my-pi/pi-ai": "18.9.
|
|
101
|
+
"@oh-my-pi/pi-ai": "18.9.2",
|
|
102
102
|
"@types/bun": "^1.3.14"
|
|
103
103
|
},
|
|
104
104
|
"engines": {
|
package/src/compat/auth-ids.ts
CHANGED
|
@@ -17,6 +17,7 @@ export type AuthProviderId =
|
|
|
17
17
|
| "charm-hyper"
|
|
18
18
|
| "cline-pass"
|
|
19
19
|
| "cloudflare-ai-gateway"
|
|
20
|
+
| "cloudflare-workers-ai"
|
|
20
21
|
| "commandcode"
|
|
21
22
|
| "coralbricks"
|
|
22
23
|
| "coreweave"
|
|
@@ -110,6 +111,7 @@ export type LoginProviderId =
|
|
|
110
111
|
| "charm-hyper"
|
|
111
112
|
| "cline-pass"
|
|
112
113
|
| "cloudflare-ai-gateway"
|
|
114
|
+
| "cloudflare-workers-ai"
|
|
113
115
|
| "commandcode"
|
|
114
116
|
| "coralbricks"
|
|
115
117
|
| "coreweave"
|
package/src/compat/axes.ts
CHANGED
|
@@ -260,7 +260,7 @@ export const AXES: Readonly<Record<string, AxisDef>> = {
|
|
|
260
260
|
"supports-per-message-effort": wire("supportsPerMessageEffort", ["anthropic"]),
|
|
261
261
|
"supports-server-compaction": wire("supportsServerCompaction", ["anthropic"]),
|
|
262
262
|
"supports-between-tools-thinking": wire("supportsBetweenToolsThinking", ["anthropic"]),
|
|
263
|
-
"supports-thinking-binding-controls": wire("supportsThinkingBindingControls", ["anthropic"]),
|
|
263
|
+
"supports-thinking-binding-controls": wire("supportsThinkingBindingControls", ["anthropic", "bedrock"]),
|
|
264
264
|
"supports-turn-scoped-system": wire("supportsTurnScopedSystem", ["anthropic"]),
|
|
265
265
|
|
|
266
266
|
// ── wire: bedrock-converse-stream ──
|
|
@@ -406,6 +406,11 @@ export const AXES: Readonly<Record<string, AxisDef>> = {
|
|
|
406
406
|
"image-tokenization": { key: "imageTokenization", set: "catalog", shape: "object" },
|
|
407
407
|
"image-model": { key: "imageModel", set: "catalog", shape: "scalar" },
|
|
408
408
|
"inline-image-byte-budget": { key: "inlineImageByteBudget", set: "catalog", shape: "scalar" },
|
|
409
|
+
/**
|
|
410
|
+
* Most questions one System One judgment request may carry; the judge
|
|
411
|
+
* splits larger requests. Unassigned: the endpoint takes any batch size.
|
|
412
|
+
*/
|
|
413
|
+
"judgment-questions-max": { key: "judgmentQuestionsMax", set: "catalog", shape: "scalar" },
|
|
409
414
|
"limits-patch": { key: "limitsPatch", set: "catalog", shape: "object" },
|
|
410
415
|
"long-context-cost": { key: "longContext", set: "catalog", shape: "object" },
|
|
411
416
|
"prompt-cache": { key: "promptCache", set: "catalog", shape: "object" },
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Model } from "../types";
|
|
2
|
+
import { resolveCatalogPolicy } from "./catalog-policy";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Most questions one System One judgment request to this model may carry
|
|
6
|
+
* (`judgment-questions-max` axis), or `undefined` when the endpoint takes any
|
|
7
|
+
* batch size.
|
|
8
|
+
*/
|
|
9
|
+
export function resolveJudgmentQuestionsMax(model: Model): number | undefined {
|
|
10
|
+
const value = resolveCatalogPolicy(model).judgmentQuestionsMax;
|
|
11
|
+
return typeof value === "number" && Number.isInteger(value) && value > 0 ? value : undefined;
|
|
12
|
+
}
|
package/src/compat/resolve.ts
CHANGED
|
@@ -942,6 +942,9 @@ function resolveBedrockPolicy(spec: ModelSpec<"bedrock-converse-stream">, axes:
|
|
|
942
942
|
promptCacheMinimumTokens: 0,
|
|
943
943
|
promptCacheMaximumCheckpoints: 0,
|
|
944
944
|
supportsForcedToolChoice: true,
|
|
945
|
+
// Opt-out: every prefix-bound Claude line on Converse takes the controls,
|
|
946
|
+
// including custom Bedrock-wire providers; KDL or models.yml sets `false`.
|
|
947
|
+
supportsThinkingBindingControls: true,
|
|
945
948
|
};
|
|
946
949
|
// Reasoning capability is a mechanism gate; adaptive-lineage duration is rule-owned.
|
|
947
950
|
compat.streamIdleTimeoutMs = compatReasoning(spec, axes) ? BEDROCK_REASONING_STREAM_IDLE_TIMEOUT_MS : undefined;
|
|
@@ -219,6 +219,8 @@ One object axis carries a computed form: `long-context-cost` accepts either the
|
|
|
219
219
|
|
|
220
220
|
`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. The budget applies only while `compat.officialEndpoint` holds: a custom `baseUrl` imposes its own body limit.
|
|
221
221
|
|
|
222
|
+
`judgment-questions-max` is the most questions one System One judgment request may carry (razorback16/openjev: 256; Cloudflare Clef on Workers AI and through OpenRouter Decisions: 64; unidentified `*openjev*` deployments: 16). The coding agent reads it through `resolveJudgmentQuestionsMax` and `NativeJudge` splits larger requests into parallel chunks; unassigned means the endpoint takes any batch size. [`providers/judgment-questions.kdl`](providers/judgment-questions.kdl) lists the servers verified uncapped or not isolatable.
|
|
223
|
+
|
|
222
224
|
`prompt-cache-lookback` is how many block positions back from a cache breakpoint the model's prompt cache looks for an earlier request's entry (Claude: 20, counting the breakpoint; a run of consecutive `tool_use` or `tool_result` blocks is one position). The coding agent reads it through `resolvePromptCacheLookback` and keeps warm-cache tool-result pruning inside the window; unassigned means no known bound.
|
|
223
225
|
|
|
224
226
|
The routed-subscription registry axes (`upstream-rotation`, `region-upstreams-global|us|eu`, `region-limits-eu`, `credit-rates`, `list-price-from`, `routing-family`, `policy-aliases`, `entitlement`, `default-reasoning-off`) describe a gateway whose proxy fans one model out to several upstreams. They are read through `src/compat/factory-droid.ts` by Factory Droid discovery and its request provider, not materialized by `buildModel`. A provider-wide `region-upstreams-*` rule is the upstream serving table and a model rule replaces it for that region. `list-price-from "<provider>" ["<id>"]` shows a bundled row's list price beside the subscription's own billing; unlike seed values it is resolved at runtime and degrades to the seed's zero cost when the row is gone. See [`providers/factory-droid.kdl`](providers/factory-droid.kdl), whose wire and billing pool per model are `api-routes` and `quota-tiers` rules in `runtime/behavior.kdl`.
|
|
@@ -425,7 +427,7 @@ Only `discovery` enrolls a provider in `generate-models.ts`; providers without i
|
|
|
425
427
|
|
|
426
428
|
A `seed` _defines_ bundled rows for providers whose catalog cannot be discovered at generation time — credential-scoped rosters, unauthenticated regens, or models ahead of upstream catalogs. Every other stratum patches rows; this one authors them. Runtime model managers hand the rows to `staticModels` through `seedModels(provider)`; the generator bundles them per the seed's `bundle` policy. Values are literal — a seed never derives from another provider's row, and pricing is never borrowed.
|
|
427
429
|
|
|
428
|
-
`seed` properties: `api` and `base-url` are per-row defaults (a `model` may override either with the same property names); `bundle` defaults to `always`; `precedence="seed"` is optional. `model` takes the
|
|
430
|
+
`seed` properties: `api` and `base-url` are per-row defaults (a `model` may override either with the same property names); `bundle` defaults to `always`; `precedence="seed"` is optional. `model` takes the row id positionally, requires `name=`, and its body MUST declare `reasoning`, `input` (`"text"` and/or `"image"`), `cost` (all four per-million rates), and `limits` (`context=` / `max-tokens=`, an omitted limit is `null`); `supports-tools #true` is optional, and `request-model-id "<wire id>"` sets the row's `requestModelId` when the upstream id differs from the row id (an OpenAI Decisions judge row beside the same-id chat model). Any other directive is an axis from the cascade vocabulary: thinking axes become the row's explicit `thinking` (then `thinking-mode` and `thinking-efforts` are both required), wire axes become its explicit `compat` and must apply to the row's API, and catalog axes are rejected because they stay rule-owned in the cascade block. Explicit `thinking`/`compat` on a seed row win over the cascade exactly as they do for any authored spec.
|
|
429
431
|
|
|
430
432
|
`bundle` decides when the generator includes the rows:
|
|
431
433
|
|
|
@@ -8,6 +8,6 @@ login-order "openai-codex" "anthropic" "zai" "zai-coding-plan" "kimi-code" "open
|
|
|
8
8
|
"xiaomi-token-plan-ams" "xiaomi-token-plan-cn" "firepass" "cline-pass" "factory-droid" "commandcode" "charm-hyper" "deepseek" "stepfun" "muse-code" "meta" "moonshot" \
|
|
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
|
-
"vercel-ai-gateway" "cloudflare-ai-gateway" "snowflake" "litellm" "kilo" "zenmux" "opencode-zen" "opencode-go" \
|
|
11
|
+
"vercel-ai-gateway" "cloudflare-ai-gateway" "cloudflare-workers-ai" "snowflake" "litellm" "kilo" "zenmux" "opencode-zen" "opencode-go" \
|
|
12
12
|
"yolo-auto" "tavily" "kagi" "exa" "parallel" "typesafe" "ollama" "ollama-cloud" "lm-studio" "llama.cpp" "vllm" \
|
|
13
13
|
"gmi-cloud" "stencil" "singularityapi-dev" "singularityapi-tech" "coralbricks"
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Cloudflare Workers AI runs the Clef decision models under
|
|
2
|
+
// `/client/v4/accounts/{account_id}/ai/run`. Login stores the API token with
|
|
3
|
+
// the account id (the shared Cloudflare credential); an env-supplied token
|
|
4
|
+
// takes its account from `CLOUDFLARE_ACCOUNT_ID`.
|
|
5
|
+
auth "cloudflare-workers-ai" {
|
|
6
|
+
name "Cloudflare Workers AI"
|
|
7
|
+
env "CLOUDFLARE_API_TOKEN" "CLOUDFLARE_AUTH_TOKEN"
|
|
8
|
+
login "custom" hook="cloudflare-workers-ai"
|
|
9
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// Model-lineage compat for "qwen"; regenerated from the frozen census using class taxonomy selectors.
|
|
2
2
|
|
|
3
3
|
class "qwen" {
|
|
4
|
-
|
|
4
|
+
// Groq owns its Qwen effort ladder in providers/groq.kdl.
|
|
5
|
+
on "aiand" "aimlapi" "alibaba-coding-plan" "amazon-bedrock" "coreweave" "huggingface" \
|
|
5
6
|
"kilo" "nanogpt" "novita" "nvidia" "ollama-cloud" "openrouter" "synthetic" \
|
|
6
7
|
"together" "venice" "wafer-serverless" "zenmux" {
|
|
7
8
|
thinking-efforts "minimal" "low" "medium" "high"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Cloudflare Workers AI decision models. Clef and Clef Flash answer typed
|
|
2
|
+
// questions over JSON state with the TypeSafe System One body
|
|
3
|
+
// (`{model, state, questions}`) at
|
|
4
|
+
// `POST /client/v4/accounts/{account_id}/ai/run/@cf/cloudflare/<model>`.
|
|
5
|
+
// `<account>` in the base URL is resolved per request from the stored login
|
|
6
|
+
// credential (else `CLOUDFLARE_ACCOUNT_ID`).
|
|
7
|
+
|
|
8
|
+
provider "cloudflare-workers-ai" {
|
|
9
|
+
default-model "@cf/cloudflare/clef"
|
|
10
|
+
env "CLOUDFLARE_API_TOKEN" "CLOUDFLARE_AUTH_TOKEN"
|
|
11
|
+
|
|
12
|
+
// developers.cloudflare.com/workers-ai/models/clef and /clef-flash: both
|
|
13
|
+
// take text and image input and bill input tokens only.
|
|
14
|
+
seed api="workers-ai-systemone" base-url="https://api.cloudflare.com/client/v4/accounts/<account>/ai/run" bundle="always" {
|
|
15
|
+
model "@cf/cloudflare/clef" name="Clef" {
|
|
16
|
+
reasoning #false
|
|
17
|
+
input "text" "image"
|
|
18
|
+
cost input=0.24 output=0 cache-read=0 cache-write=0
|
|
19
|
+
limits context=65536
|
|
20
|
+
supports-tools #false
|
|
21
|
+
}
|
|
22
|
+
model "@cf/cloudflare/clef-flash" name="Clef Flash" {
|
|
23
|
+
reasoning #false
|
|
24
|
+
input "text" "image"
|
|
25
|
+
cost input=0.038 output=0 cache-read=0 cache-write=0
|
|
26
|
+
limits context=24576
|
|
27
|
+
supports-tools #false
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
models "*" {
|
|
32
|
+
kind "judge"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -4,8 +4,29 @@ provider "groq" {
|
|
|
4
4
|
default-model "openai/gpt-oss-120b"
|
|
5
5
|
env "GROQ_API_KEY"
|
|
6
6
|
|
|
7
|
+
// Groq validates assistant message properties and refuses `reasoning_content`
|
|
8
|
+
// (400 "property 'reasoning_content' is unsupported"), so the Kimi lineage's
|
|
9
|
+
// tool-call replay field, real or the "." placeholder, is never sent here.
|
|
10
|
+
requires-reasoning-content-for-tool-calls #false
|
|
7
11
|
thinking-mode "effort"
|
|
8
12
|
class "unknown" {
|
|
9
13
|
thinking-efforts "minimal" "low" "medium" "high" "xhigh"
|
|
10
14
|
}
|
|
15
|
+
// Groq accepts OpenAI `reasoning_effort` for Qwen, with `none` as its off
|
|
16
|
+
// value, not Qwen-native `enable_thinking` (400 "property 'enable_thinking'
|
|
17
|
+
// is unsupported"). Its documented Qwen ladder (Qwen 3.8) is low/medium/high;
|
|
18
|
+
// `minimal` answers 400 "invalid Qwen3.8 reasoning_effort".
|
|
19
|
+
class "qwen" {
|
|
20
|
+
thinking-format "openai"
|
|
21
|
+
reasoning-disable-mode "none-effort"
|
|
22
|
+
thinking-efforts "low" "medium" "high"
|
|
23
|
+
}
|
|
24
|
+
// Qwen 3.6 only takes `default` (thinking) or `none` (off), per its Groq
|
|
25
|
+
// model card.
|
|
26
|
+
models "qwen/qwen3.6-27b" {
|
|
27
|
+
thinking-efforts "high"
|
|
28
|
+
thinking-effort-map {
|
|
29
|
+
high "default"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
11
32
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Most questions one System One judgment request may carry. A server that
|
|
2
|
+
// validates the `questions` map rejects an oversized request (HTTP 400/422)
|
|
3
|
+
// before judging anything, so the judge splits larger requests. Scoped by
|
|
4
|
+
// adapter, not provider name: self-hosted servers are user-configured judge
|
|
5
|
+
// rows under arbitrary provider ids.
|
|
6
|
+
//
|
|
7
|
+
// Unassigned, verified without a count cap (token budget only): TypeSafe jev
|
|
8
|
+
// (docs.typesafe.ai/models: 64k tokens per request), the same jev behind
|
|
9
|
+
// OpenRouter Decisions, Command Code and OpenCode Zen, Kev
|
|
10
|
+
// (github.com/jaredpalmer/kev: "A request may carry any number of
|
|
11
|
+
// questions"), and wev / OpenJev-4B (github.com/alanhuangyoo/OpenJev, which
|
|
12
|
+
// answers under any requested name).
|
|
13
|
+
//
|
|
14
|
+
// Unassigned: OpenAI Decisions (`openai-decisions`); its guide
|
|
15
|
+
// (developers.openai.com/api/docs/guides/decisions) documents no question cap.
|
|
16
|
+
//
|
|
17
|
+
// Not isolatable: openjev-sglang (github.com/ekzhang/openjev-sglang) caps at
|
|
18
|
+
// 64 but answers as `jev-latest` or its upstream model name, the same ids as
|
|
19
|
+
// uncapped hosts.
|
|
20
|
+
on-api "typesafe" "openrouter-decisions" {
|
|
21
|
+
// residue: no taxonomy class covers self-hosted OpenJEV deployments. An
|
|
22
|
+
// `openjev-*` gateway answered HTTP 422 `at most 16 items`
|
|
23
|
+
// (https://github.com/can1357/oh-my-pi/issues/15081); which server that is
|
|
24
|
+
// remains unidentified, so unknown OpenJEV ids keep the smallest cap
|
|
25
|
+
// observed. Over-splitting costs requests; under-splitting fails them.
|
|
26
|
+
models "*openjev*" {
|
|
27
|
+
judgment-questions-max 16
|
|
28
|
+
}
|
|
29
|
+
// residue: razorback16/openjev and its Swift port (Algorythm-Canada/
|
|
30
|
+
// OpenJevSwift) reject more than OPENJEV_MAX_QUESTIONS, default 256, with
|
|
31
|
+
// `at most 256 questions per request`. These are the wire names their
|
|
32
|
+
// DiffusionGemma, Laya, Verdict and JevK5 backends answer under; exact ids
|
|
33
|
+
// outrank the glob above.
|
|
34
|
+
models "openjev-latest" "openjev-0.1" "laya-1.0" "verdict-1.4" "jevk5-0.2" {
|
|
35
|
+
judgment-questions-max 256
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// Cloudflare Clef, Clef Flash and Clef Omni: the Workers AI input schema
|
|
39
|
+
// bounds `questions` to 1-64 entries (`maxProperties: 64`,
|
|
40
|
+
// developers.cloudflare.com/workers-ai/models/clef, /clef-flash, /clef-omni).
|
|
41
|
+
on-api "workers-ai-systemone" {
|
|
42
|
+
models "@cf/cloudflare/clef*" {
|
|
43
|
+
judgment-questions-max 64
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
// OpenRouter Decisions serves its `cloudflare/clef*` rows from Workers AI (and
|
|
47
|
+
// PrimeIntellect, whose cap is unpublished), so the Workers AI schema's 64
|
|
48
|
+
// applies; scoped apart from the TypeSafe block above.
|
|
49
|
+
on-api "openrouter-decisions" {
|
|
50
|
+
models "cloudflare/clef*" {
|
|
51
|
+
judgment-questions-max 64
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -84,8 +84,23 @@ provider "openai" {
|
|
|
84
84
|
limits context=8192
|
|
85
85
|
supports-tools #false
|
|
86
86
|
}
|
|
87
|
+
// Decisions API (`POST /v1/decisions`, public beta,
|
|
88
|
+
// developers.openai.com/api/docs/guides/decisions) answers typed questions
|
|
89
|
+
// with GPT-6 Luna. The wire id is the chat row's `gpt-6-luna`, so the judge
|
|
90
|
+
// row takes its own id. Billed $0.10 per 1M input tokens, no output charge.
|
|
91
|
+
model "gpt-6-luna-decisions" name="GPT-6 Luna Decisions" api="openai-decisions" base-url="https://api.openai.com/v1" {
|
|
92
|
+
request-model-id "gpt-6-luna"
|
|
93
|
+
reasoning #false
|
|
94
|
+
input "text" "image"
|
|
95
|
+
cost input=0.1 output=0 cache-read=0 cache-write=0
|
|
96
|
+
limits context=1050000
|
|
97
|
+
supports-tools #false
|
|
98
|
+
}
|
|
87
99
|
}
|
|
88
100
|
|
|
101
|
+
models "gpt-6-luna-decisions" {
|
|
102
|
+
kind "judge"
|
|
103
|
+
}
|
|
89
104
|
models "whisper-1" "gpt-4o-transcribe" "gpt-4o-mini-transcribe" {
|
|
90
105
|
kind "stt"
|
|
91
106
|
}
|