@oh-my-pi/pi-catalog 18.2.10 → 18.3.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 (36) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +1 -1
  3. package/THIRD-PARTY-NOTICES.txt +1 -1
  4. package/dist/types/compat/auth-ids.d.ts +2 -2
  5. package/dist/types/compat/provider-ids.d.ts +1 -1
  6. package/dist/types/compat/types.d.ts +4 -0
  7. package/dist/types/discovery/cursor-proto.d.ts +1 -1
  8. package/dist/types/discovery/devin-proto.d.ts +1 -1
  9. package/dist/types/provider-models/openai-compat.d.ts +25 -0
  10. package/dist/types/types.d.ts +24 -6
  11. package/package.json +8 -5
  12. package/src/compat/auth-ids.ts +3 -0
  13. package/src/compat/provider-ids.ts +2 -0
  14. package/src/compat/rules/README.md +4 -0
  15. package/src/compat/rules/auth/_order.kdl +1 -1
  16. package/src/compat/rules/auth/anthropic.kdl +1 -0
  17. package/src/compat/rules/auth/apple.kdl +4 -0
  18. package/src/compat/rules/auth/openai-codex.kdl +1 -0
  19. package/src/compat/rules/auth/stepfun.kdl +13 -0
  20. package/src/compat/rules/auth/xai-oauth.kdl +1 -0
  21. package/src/compat/rules/classes/anthropic.kdl +23 -18
  22. package/src/compat/rules/providers/apple.kdl +8 -0
  23. package/src/compat/rules/providers/openai-codex.kdl +16 -0
  24. package/src/compat/rules/providers/stepfun.kdl +95 -0
  25. package/src/compat/rules/runtime/behavior.kdl +10 -2
  26. package/src/compat/rules.json +1 -1
  27. package/src/compat/types.ts +4 -0
  28. package/src/discovery/codex.ts +29 -4
  29. package/src/discovery/cursor-proto.ts +1 -1
  30. package/src/discovery/devin-proto.ts +1 -1
  31. package/src/model-manager.ts +8 -2
  32. package/src/models.json +1 -1
  33. package/src/provider-models/descriptors.ts +2 -0
  34. package/src/provider-models/openai-compat.ts +92 -1
  35. package/src/provider-models/special.ts +11 -2
  36. package/src/types.ts +26 -6
package/CHANGELOG.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [18.3.0] - 2026-09-24
6
+
7
+ ### Added
8
+
9
+ - Added compaction support for the `claude-mythos-preview` model.
10
+ - Added provider and authentication rule definitions for on-device Apple Foundation Models.
11
+ - Added per-account discovery of Codex cyber access entitlements.
12
+ - Added `org-scoped-identity` and `oauth-token-env` authentication rules for providers.
13
+
14
+ ## [18.2.11] - 2026-09-23
15
+
16
+ ### Added
17
+
18
+ - Added built-in StepFun provider support for the step-5-preview model, including live model discovery.
19
+
20
+ ### Fixed
21
+
22
+ - Fixed cost estimation for OpenAI Codex GPT-6 Sol and Luna models across standard and worker routes.
23
+ - Fixed GitHub Copilot Grok 4.x models failing to make requests.
24
+
5
25
  ## [18.2.10] - 2026-09-22
6
26
 
7
27
  ### Changed
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @oh-my-pi/pi-catalog
2
2
 
3
- Model catalog for [oh-my-pi](https://github.com/can1357/oh-my-pi): bundled model database, provider discovery, model identity, classification, and equivalence.
3
+ Model catalog for [omp](https://github.com/can1357/oh-my-pi): bundled model database, provider discovery, model identity, classification, and equivalence.
4
4
 
5
5
  ## What's inside
6
6
 
@@ -293,7 +293,7 @@ MIT License
293
293
  Copyright (c) 2026 Sander Land
294
294
  (measured tokenizer vocabulary data, reconstruction model, and reference
295
295
  implementation: https://github.com/sanderland/ctok)
296
- Copyright (c) 2026 Can Bölük and the Oh My Pi contributors
296
+ Copyright (c) 2026 Can Bölük and the omp contributors
297
297
  Copyright (c) 2026 Stencil Labs, Inc.
298
298
  (Rust implementation and the compact binary vocabulary encoding in
299
299
  crates/pi-natives/src/utok/claude)
@@ -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" | "azure" | "baseten" | "bedrock-mantle" | "cerebras" | "charm-hyper" | "cline-pass" | "cloudflare-ai-gateway" | "commandcode" | "coreweave" | "cursor" | "deepinfra" | "deepseek" | "devin" | "exa" | "firepass" | "fireworks" | "github-copilot" | "gitlab-duo" | "gitlab-duo-agent" | "gmi-cloud" | "google" | "google-antigravity" | "google-gemini-cli" | "google-vertex" | "groq" | "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" | "stencil" | "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" | "commandcode" | "coreweave" | "cursor" | "deepinfra" | "deepseek" | "devin" | "exa" | "firepass" | "fireworks" | "github-copilot" | "gitlab-duo" | "gitlab-duo-agent" | "gmi-cloud" | "google" | "google-antigravity" | "google-gemini-cli" | "google-vertex" | "groq" | "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" | "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" | "firepass" | "fireworks" | "github-copilot" | "gitlab-duo" | "gitlab-duo-agent" | "gmi-cloud" | "google-antigravity" | "google-gemini-cli" | "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" | "stencil" | "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" | "commandcode" | "coreweave" | "cursor" | "deepinfra" | "deepseek" | "devin" | "exa" | "firepass" | "fireworks" | "github-copilot" | "gitlab-duo" | "gitlab-duo-agent" | "gmi-cloud" | "google-antigravity" | "google-gemini-cli" | "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" | "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";
@@ -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" | "azure" | "baseten" | "bedrock-mantle" | "cerebras" | "charm-hyper" | "cline-pass" | "cloudflare-ai-gateway" | "commandcode" | "coreweave" | "cursor" | "deepinfra" | "deepseek" | "devin" | "firepass" | "fireworks" | "github-copilot" | "gitlab-duo" | "gitlab-duo-agent" | "gmi-cloud" | "google" | "google-antigravity" | "google-gemini-cli" | "google-vertex" | "groq" | "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" | "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" | "commandcode" | "coreweave" | "cursor" | "deepinfra" | "deepseek" | "devin" | "firepass" | "fireworks" | "github-copilot" | "gitlab-duo" | "gitlab-duo-agent" | "gmi-cloud" | "google" | "google-antigravity" | "google-gemini-cli" | "google-vertex" | "groq" | "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" | "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";
@@ -530,6 +530,10 @@ export interface CompiledAuthProvider {
530
530
  hook: string;
531
531
  };
532
532
  allowsMissingApiKey?: boolean;
533
+ /** Qualify credential and usage-report identity by org when an email may have multiple subscriptions. */
534
+ orgScopedIdentity?: boolean;
535
+ /** Environment variables carrying this provider's own OAuth bearer, excluding borrowed API-key aliases. */
536
+ oauthTokenEnv?: string[];
533
537
  /** APIs whose provider transport resolves credentials without a stored account. */
534
538
  nativeAuthApis?: string[];
535
539
  available?: boolean;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Cursor agent protocol declarations used by Oh My Pi.
2
+ * Cursor agent protocol declarations used by omp.
3
3
  *
4
4
  * Each declaration retains only fields consumed by the client or its protocol tests.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Devin protocol declarations used by Oh My Pi.
2
+ * Devin protocol declarations used by omp.
3
3
  *
4
4
  * Each declaration retains only fields consumed by the client or its protocol tests.
5
5
  */
@@ -476,6 +476,31 @@ export interface YoloAutoModelManagerConfig {
476
476
  * code change.
477
477
  */
478
478
  export declare function yoloAutoModelManagerOptions(config?: YoloAutoModelManagerConfig): ModelManagerOptions<"openai-completions">;
479
+ /**
480
+ * StepFun discovery configuration: the API key plus optional base-URL and
481
+ * fetch overrides. Consumed by {@link stepfunModelManagerOptions}, and exported
482
+ * for extensions and tests that construct the manager directly.
483
+ */
484
+ export interface StepfunModelManagerConfig {
485
+ apiKey?: string;
486
+ baseUrl?: string;
487
+ fetch?: FetchImpl;
488
+ }
489
+ /**
490
+ * Whether a StepFun `/v1/models` id is a chat model omp can route. StepFun's
491
+ * roster interleaves its audio and image SKUs with the chat models; the
492
+ * exclusion policy itself lives in `runtime/behavior.kdl` (`exclude-models
493
+ * provider="stepfun"`), not here.
494
+ */
495
+ export declare function isStepfunChatModelId(id: string): boolean;
496
+ /**
497
+ * StepFun model manager: plain OpenAI-compatible chat completions at
498
+ * `api.stepfun.ai/v1`. A successful `/v1/models` snapshot is authoritative over
499
+ * the bundled seed rows (`providers/stepfun.kdl`), so a model StepFun retires
500
+ * leaves the picker instead of lingering as a dead seed row, while models added
501
+ * later become selectable without an omp release.
502
+ */
503
+ export declare function stepfunModelManagerOptions(config?: StepfunModelManagerConfig): ModelManagerOptions<"openai-completions">;
479
504
  export interface QwenPortalModelManagerConfig {
480
505
  apiKey?: string;
481
506
  baseUrl?: string;
@@ -2,7 +2,7 @@ import type { ModelIdentity } from "./compat/types.js";
2
2
  import type { Effort } from "./effort.js";
3
3
  export type { FetchImpl } from "@oh-my-pi/pi-utils";
4
4
  export type { KnownProvider } from "./provider-models/descriptors.js";
5
- export type KnownApi = "openai-completions" | "openai-responses" | "openrouter" | "openai-codex-responses" | "azure-openai-responses" | "anthropic-messages" | "bedrock-converse-stream" | "google-generative-ai" | "google-gemini-cli" | "google-vertex" | "ollama-chat" | "cursor-agent" | "gitlab-duo-agent" | "devin-agent";
5
+ export type KnownApi = "openai-completions" | "openai-responses" | "openrouter" | "openai-codex-responses" | "azure-openai-responses" | "anthropic-messages" | "bedrock-converse-stream" | "google-generative-ai" | "google-gemini-cli" | "google-vertex" | "ollama-chat" | "cursor-agent" | "gitlab-duo-agent" | "devin-agent" | "apple-foundation-models";
6
6
  export type Api = KnownApi | (string & {});
7
7
  /** Catalog kinds used to isolate role-specific runners from session chat models. */
8
8
  export declare const MODEL_KINDS: readonly ["chat", "tiny", "image", "tts", "stt", "search", "judge", "embedding", "rerank", "video"];
@@ -441,17 +441,17 @@ export interface AnthropicCompat {
441
441
  /** Whether thinking requests may include `context_management` and its beta header. Default: true. */
442
442
  supportsContextManagement?: boolean;
443
443
  /**
444
- * Whether the model lineage supports Anthropic server-side compaction
445
- * (`compact-2026-01-12`: the `compact_20260112` edit and replayed
446
- * `compaction` blocks). Rule-owned per model line; the beta covers the
447
- * adaptive-thinking generation onward and rejects older lines. Default: false.
444
+ * Whether the model and host support Anthropic on-demand compaction
445
+ * (`compact-2026-09-04` requests and signed replay). Enabled on Opus 4.6+,
446
+ * Sonnet 4.6+, Fable/Mythos 5+ on supported hosts. Default: false.
448
447
  */
449
448
  supportsServerCompaction?: boolean;
450
449
  /**
451
450
  * Whether the model is served by the first-party Anthropic provider (its
452
451
  * default route is the official API). Rule-owned on the provider; the
453
452
  * compaction transport pairs it with a per-request effective-URL check
454
- * because reroutes leave it stale-true. Default: false.
453
+ * because reroutes leave it stale-true. Vertex is selected by its provider
454
+ * contract instead. Default: false.
455
455
  */
456
456
  firstPartyProvider?: boolean;
457
457
  /**
@@ -953,6 +953,15 @@ export interface ModelCost extends TokenCost {
953
953
  * `"deepseek-v3"`; Kimi K2 through K3 share `"kimi-k2"`.
954
954
  */
955
955
  export type ModelTokenizer = "claude-v3" | "claude-v47" | "claude-v5" | "claude-v5-sonnet" | "qwen3" | "deepseek-v3" | "kimi-k2" | "glm5";
956
+ /** One account's discovered entitlements on a model; see {@link Model.accountAccess}. */
957
+ export interface ModelAccountAccess {
958
+ /**
959
+ * Codex `available_access_programs.cyber`: cyber access programs this account
960
+ * may request on the model (`standard`, `daybreak_blue`, `daybreak_red`).
961
+ * Absent when the backend reported no program metadata.
962
+ */
963
+ cyberPrograms?: readonly string[];
964
+ }
956
965
  export interface Model<TApi extends Api = Api> {
957
966
  id: string;
958
967
  /** Role-specific runner capability; omitted for ordinary chat models. */
@@ -1046,6 +1055,15 @@ export interface Model<TApi extends Api = Api> {
1046
1055
  * their single wire id) and on bundled snapshots that predate discovery.
1047
1056
  */
1048
1057
  cursorMaxModeRoutes?: Readonly<Record<string, boolean>>;
1058
+ /**
1059
+ * Per-account availability recorded by multi-account discovery: provider
1060
+ * account id (Codex: ChatGPT `chatgpt_account_id`) → that account's
1061
+ * entitlements on this model. An account appears only when its own catalog
1062
+ * lists the model, so credential selection can route account-gated models
1063
+ * (e.g. `gpt-daybreak-blue-latest`) straight to eligible accounts. Absent on
1064
+ * bundled/config rows and on single-account discovery.
1065
+ */
1066
+ accountAccess?: Readonly<Record<string, ModelAccountAccess>>;
1049
1067
  cost: ModelCost;
1050
1068
  /** Premium Copilot requests charged per user-initiated request (defaults to 1). */
1051
1069
  premiumMultiplier?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oh-my-pi/pi-catalog",
3
- "version": "18.2.10",
3
+ "version": "18.3.0",
4
4
  "description": "Model catalog for omp: bundled model database, provider discovery descriptors, model identity, classification, and equivalence",
5
5
  "keywords": [
6
6
  "ai",
@@ -14,7 +14,10 @@
14
14
  "url": "https://github.com/can1357/oh-my-pi/issues"
15
15
  },
16
16
  "license": "MIT",
17
- "author": "Stencil Labs, Inc.",
17
+ "author": {
18
+ "name": "Stencil Labs, Inc.",
19
+ "url": "https://stencil.so"
20
+ },
18
21
  "repository": {
19
22
  "type": "git",
20
23
  "url": "git+https://github.com/can1357/oh-my-pi.git",
@@ -90,12 +93,12 @@
90
93
  "gen:proto": "bun scripts/generate-protocols.ts"
91
94
  },
92
95
  "dependencies": {
93
- "@oh-my-pi/omptype": "18.2.10",
94
- "@oh-my-pi/pi-utils": "18.2.10"
96
+ "@oh-my-pi/omptype": "18.3.0",
97
+ "@oh-my-pi/pi-utils": "18.3.0"
95
98
  },
96
99
  "devDependencies": {
97
100
  "@bgotink/kdl": "0.4.0",
98
- "@oh-my-pi/pi-ai": "18.2.10",
101
+ "@oh-my-pi/pi-ai": "18.3.0",
99
102
  "@types/bun": "^1.3.14"
100
103
  },
101
104
  "engines": {
@@ -9,6 +9,7 @@ export type AuthProviderId =
9
9
  | "alibaba-token-plan"
10
10
  | "amazon-bedrock"
11
11
  | "anthropic"
12
+ | "apple"
12
13
  | "azure"
13
14
  | "baseten"
14
15
  | "bedrock-mantle"
@@ -70,6 +71,7 @@ export type AuthProviderId =
70
71
  | "singularityapi-dev"
71
72
  | "singularityapi-tech"
72
73
  | "stencil"
74
+ | "stepfun"
73
75
  | "synthetic"
74
76
  | "tavily"
75
77
  | "together"
@@ -151,6 +153,7 @@ export type LoginProviderId =
151
153
  | "singularityapi-dev"
152
154
  | "singularityapi-tech"
153
155
  | "stencil"
156
+ | "stepfun"
154
157
  | "synthetic"
155
158
  | "tavily"
156
159
  | "together"
@@ -9,6 +9,7 @@ export type KnownProvider =
9
9
  | "alibaba-token-plan"
10
10
  | "amazon-bedrock"
11
11
  | "anthropic"
12
+ | "apple"
12
13
  | "azure"
13
14
  | "baseten"
14
15
  | "bedrock-mantle"
@@ -63,6 +64,7 @@ export type KnownProvider =
63
64
  | "siliconflow-cn"
64
65
  | "singularityapi-dev"
65
66
  | "singularityapi-tech"
67
+ | "stepfun"
66
68
  | "synthetic"
67
69
  | "together"
68
70
  | "typesafe"
@@ -346,12 +346,16 @@ auth "anthropic" {
346
346
  expiry "jwt-or-never" // session-JWT expiry policy
347
347
  result "api-key" // OAuth login persists only credentials.access as a plain API key
348
348
  allows-missing-api-key #true
349
+ org-scoped-identity #true // qualify credential/report identity by org (one email can have multiple subscriptions)
350
+ oauth-token-env "PROVIDER_OAUTH_TOKEN" // dedicated OAuth bearer env vars, excluding borrowed API-key aliases in provider env
349
351
  native-auth-api "bedrock-converse-stream" // provider transport resolves auth; scan plans pin this API without secrets
350
352
  available #false
351
353
  show-in-login-list #false
352
354
  }
353
355
  ```
354
356
 
357
+ `org-scoped-identity #true` keeps credentials and usage reports for different organizations separate even when they share an email; absent or `#false` uses ordinary account identity. `oauth-token-env` takes one or more ordered, non-empty env names carrying this provider's own OAuth bearer. When present, availability ignores other provider-env aliases, and usage probes accept only stored OAuth credentials or the first set bearer from that list; absent providers keep the ordinary API-key env behavior.
358
+
355
359
  Login kinds:
356
360
 
357
361
  - `login "api-key" { auth-url "…"; instructions "…"; prompt "…" placeholder="…"; empty-fallback "…"; normalize "strip-bearer"; validate … }` — `validate "chat-completions" base-url= model= tolerate-model-denied= max-tokens-field= max-tokens=`, `validate "anthropic-messages" base-url= model=`, or `validate "models-endpoint" url= base-url-env= headers-hook=`; all accept `label=` (error-message label, defaults to `name`) and `optional=#true` (only auth failures reject).
@@ -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" "minimax-code" "minimax-code-cn" "xiaomi" "xiaomi-token-plan-sgp" \
8
- "xiaomi-token-plan-ams" "xiaomi-token-plan-cn" "firepass" "cline-pass" "commandcode" "charm-hyper" "deepseek" "muse-code" "meta" "moonshot" \
8
+ "xiaomi-token-plan-ams" "xiaomi-token-plan-cn" "firepass" "cline-pass" "commandcode" "charm-hyper" "deepseek" "stepfun" "muse-code" "meta" "moonshot" \
9
9
  "cerebras" "baseten" "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" "litellm" "kilo" "zenmux" "opencode-zen" "opencode-go" \
@@ -1,5 +1,6 @@
1
1
  auth "anthropic" {
2
2
  name "Anthropic (Claude Pro/Max)"
3
+ org-scoped-identity #true
3
4
  // Foundry mode optionally switches Anthropic auth to enterprise gateway credentials.
4
5
  env hook="anthropic-foundry"
5
6
  login "oauth-code" {
@@ -0,0 +1,4 @@
1
+ auth "apple" {
2
+ name "Apple Foundation Models (on-device)"
3
+ allows-missing-api-key #true
4
+ }
@@ -1,5 +1,6 @@
1
1
  auth "openai-codex" {
2
2
  name "ChatGPT Plus/Pro (Codex Subscription)"
3
+ org-scoped-identity #true
3
4
  login "oauth-code" {
4
5
  client-id "app_EMoamEEZ73f0CkXaXp7hrann"
5
6
  authorize-url "https://auth.openai.com/oauth/authorize"
@@ -0,0 +1,13 @@
1
+ auth "stepfun" {
2
+ name "StepFun"
3
+ login "api-key" {
4
+ auth-url "https://platform.stepfun.ai/interface-key"
5
+ instructions "Copy your API key from the StepFun Open Platform"
6
+ // StepFun keys are unprefixed opaque strings (no `sk-` prefix), so the
7
+ // placeholder must not teach a credential shape the console never issues.
8
+ prompt "Paste your StepFun API key" placeholder="..."
9
+ // A real auth rejection (401/403) is fatal; any other validation-endpoint
10
+ // failure is non-fatal — skip validation and trust the supplied key.
11
+ validate "chat-completions" label="StepFun" base-url="https://api.stepfun.ai/v1" model="step-5-preview" optional=#true
12
+ }
13
+ }
@@ -1,6 +1,7 @@
1
1
  // Device authorization and token refresh adapted from NousResearch/hermes-agent (MIT).
2
2
  auth "xai-oauth" {
3
3
  name "xAI Grok OAuth (SuperGrok or X Premium+)"
4
+ oauth-token-env "XAI_OAUTH_TOKEN"
4
5
  login "device-code" {
5
6
  client-id "b1a00492-073a-47ea-816f-4c329264a828"
6
7
  scopes "openid" "profile" "email" "offline_access" "grok-cli:access" "api:access"
@@ -7,27 +7,32 @@ class "anthropic" {
7
7
  thinking-prefix-binding #true
8
8
  }
9
9
  }
10
- // Server-side compaction (compact-2026-01-12) is a lineage capability: the
11
- // documented model list is the adaptive-thinking generation onward (Opus
12
- // 4.6+, Sonnet 4.6+, Fable/Mythos 5+). Whether a host delivers the beta is
13
- // decided at request time from the effective endpoint, not here.
14
- family "fable" {
15
- revision ">=5" {
16
- supports-server-compaction #true
10
+ // On-demand compaction (compact-2026-09-04) is available on the Claude
11
+ // API and Vertex, not Amazon Bedrock or unverified gateway deployments.
12
+ // Foundry / Claude Platform on AWS are first-party Anthropic routes whose
13
+ // effective URLs are checked at request time.
14
+ on "anthropic" "google-vertex" {
15
+ family "fable" {
16
+ revision ">=5" {
17
+ supports-server-compaction #true
18
+ }
17
19
  }
18
- }
19
- family "mythos" {
20
- revision ">=5" {
21
- supports-server-compaction #true
20
+ family "mythos" {
21
+ revision ">=5" {
22
+ supports-server-compaction #true
23
+ }
22
24
  }
23
- }
24
- family "opus" {
25
- revision ">=4.6" {
26
- supports-server-compaction #true
25
+ family "opus" {
26
+ revision ">=4.6" {
27
+ supports-server-compaction #true
28
+ }
27
29
  }
28
- }
29
- family "sonnet" {
30
- revision ">=4.6" {
30
+ family "sonnet" {
31
+ revision ">=4.6" {
32
+ supports-server-compaction #true
33
+ }
34
+ }
35
+ models "claude-mythos-preview" {
31
36
  supports-server-compaction #true
32
37
  }
33
38
  }
@@ -0,0 +1,8 @@
1
+ // Apple Foundation Models: the on-device system language model (macOS 27+,
2
+ // Apple silicon), bridged in-process by pi-natives. Models are discovered at
3
+ // runtime from the model's availability; nothing is bundled.
4
+
5
+ provider "apple" {
6
+ default-model "on-device"
7
+ allow-unauthenticated #true
8
+ }
@@ -80,6 +80,22 @@ provider "openai-codex" {
80
80
  }
81
81
  max-context-window 922000
82
82
  }
83
+ models "gpt-6-sol" "gpt-6-sol-wm" {
84
+ cost-patch {
85
+ input 2.0
86
+ output 10.0
87
+ cache-read 0.2
88
+ cache-write 0
89
+ }
90
+ }
91
+ models "gpt-6-luna" "gpt-6-luna-wm" {
92
+ cost-patch {
93
+ input 0.1
94
+ output 0.5
95
+ cache-read 0.01
96
+ cache-write 0
97
+ }
98
+ }
83
99
  class "openai" {
84
100
  revision ">=5.3 <5.7" {
85
101
  thinking-mode "effort"
@@ -0,0 +1,95 @@
1
+ // Provider-wire compat for "stepfun" (StepFun Open Platform, api.stepfun.ai).
2
+
3
+ provider "stepfun" {
4
+ default-model "step-5-preview"
5
+ env "STEPFUN_API_KEY"
6
+ // A successful `/v1/models` snapshot is the deployment truth, so it replaces
7
+ // the bundled seed rather than merging: StepFun retiring an id must remove
8
+ // it from the picker instead of leaving a dead seed row selectable.
9
+ dynamic-models-authoritative #true
10
+ // StepFun's own endpoint is the deployment truth: relay hosts serve the same
11
+ // ids with stray output ceilings and broader ladders, so the generator must
12
+ // not backfill limits or capabilities from same-id rows elsewhere.
13
+ skip-cross-provider-reference-fills #true
14
+ discovery label="StepFun"
15
+
16
+ // StepFun's OpenAI-compatible chat roster, bundled so the provider is
17
+ // selectable without a generation-time API key. The provider is not
18
+ // authoritative, so runtime `/v1/models` discovery merges additively; that
19
+ // endpoint also serves non-chat SKUs (StepAudio TTS/ASR, image models),
20
+ // which runtime/behavior.kdl excludes from the chat picker.
21
+ // Limits and per-model facts follow StepFun's published model cards, as
22
+ // catalogued on models.dev (`providers/stepfun-ai` + `models/stepfun`). The
23
+ // API accepts `max_tokens` far above any real cap (2M probes return 200), so
24
+ // a live probe cannot establish the ceiling, and the docs page's "64k max
25
+ // output" prose is not a limit the endpoint enforces either.
26
+ // Pricing is StepFun's published list price:
27
+ // https://platform.stepfun.ai/docs/en/guides/pricing/details
28
+ // (models.dev still carries the pre-June step-3.7-flash rates).
29
+ // A cache miss already covers writing the prefix into the cache ("the
30
+ // cache-miss input price includes writing new content to the cache"), so
31
+ // there is no separate cache-write tariff.
32
+ seed api="openai-completions" base-url="https://api.stepfun.ai/v1" bundle="always" {
33
+ // 1M context, input, and output. Input is text/image/video; video has no
34
+ // catalog representation, so the multimodal row declares text + image.
35
+ model "step-5-preview" name="Step 5 Preview" {
36
+ reasoning #true
37
+ input "text" "image"
38
+ cost input=1.0 output=2.7 cache-read=0.05 cache-write=0
39
+ limits context=1000000 max-tokens=1000000
40
+ thinking-mode "effort"
41
+ thinking-efforts "low" "medium" "high"
42
+ }
43
+ // Multimodal agent/coding SKU.
44
+ model "step-3.7-flash" name="Step 3.7 Flash" {
45
+ reasoning #true
46
+ input "text" "image"
47
+ cost input=0.2 output=1.15 cache-read=0.04 cache-write=0
48
+ limits context=256000 max-tokens=256000
49
+ thinking-mode "effort"
50
+ thinking-efforts "low" "medium" "high"
51
+ }
52
+ model "step-3.5-flash" name="Step 3.5 Flash" {
53
+ reasoning #true
54
+ input "text"
55
+ cost input=0.1 output=0.3 cache-read=0.02 cache-write=0
56
+ limits context=256000 max-tokens=256000
57
+ thinking-mode "effort"
58
+ thinking-efforts "low" "medium" "high"
59
+ }
60
+ model "step-3.5-flash-2603" name="Step 3.5 Flash 2603" {
61
+ reasoning #true
62
+ input "text"
63
+ cost input=0.1 output=0.3 cache-read=0.02 cache-write=0
64
+ limits context=256000 max-tokens=256000
65
+ thinking-mode "effort"
66
+ thinking-efforts "low" "medium" "high"
67
+ }
68
+ }
69
+
70
+ // StepFun's Chat Completions API documents `max_tokens` (default INF) and
71
+ // never the `max_completion_tokens` spelling the OpenAI baseline assumes.
72
+ max-tokens-field "max_tokens"
73
+
74
+ // StepFun's own API exposes the three-tier `reasoning_effort` ladder, while
75
+ // the shared stepfun class ladder (minimal…xhigh) documents relay hosts
76
+ // (OpenRouter, NanoGPT, NVIDIA, …). The provider scope therefore owns the
77
+ // exact set for models discovered at runtime, where no seed row declares
78
+ // thinking explicitly. Scoped by family, not revision: the stepfun taxonomy
79
+ // extracts no revision, and a family-scoped rule still cannot reach the
80
+ // class rule's `on` host list.
81
+ // Verified 2026-09-23 against
82
+ // `POST https://api.stepfun.ai/v1/chat/completions`: low/medium/high all
83
+ // return 200 on every model above, and `/v1/models` reports
84
+ // `reasoning_effort_support_list: ["low","medium","high"]` — the docs page
85
+ // still claims `step-3.5-flash-2603` accepts low/high only.
86
+ // Only reasoning models resolve a ladder (`resolveOverIndex` gates thinking
87
+ // on the target's reasoning fact), so a future non-reasoning StepFun SKU
88
+ // stays unaffected.
89
+ class "stepfun" {
90
+ family "step" {
91
+ thinking-mode "effort"
92
+ thinking-efforts "low" "medium" "high"
93
+ }
94
+ }
95
+ }
@@ -138,6 +138,9 @@ behavior {
138
138
  exclude-models provider="xiaomi-token-plan-ams" substring="-tts" substring="-asr"
139
139
  exclude-models provider="xiaomi-token-plan-cn" substring="-tts" substring="-asr"
140
140
  exclude-models provider="xiaomi-token-plan-sgp" substring="-tts" substring="-asr"
141
+ // Text-chat transports cannot serve StepFun's audio-only and image-editing
142
+ // SKUs, which its /v1/models roster interleaves with the chat models.
143
+ exclude-models provider="stepfun" prefix="stepaudio-" prefix="step-image-" prefix="step-tts-" prefix="step-2x-large"
141
144
  // SuperGrok's roster interleaves media models the chat picker cannot
142
145
  // serve; the dedicated tool surfaces route them instead.
143
146
  exclude-models provider="xai-oauth" exact="grok-imagine-image-quality" exact="grok-imagine-image-2.0" \
@@ -169,11 +172,16 @@ behavior {
169
172
  prefix="qwen-audio-" prefix="qwen-image-" prefix="text-embedding-" prefix="wan2.7-"
170
173
  // Copilot's /models listing carries no transport field; route Claude ids
171
174
  // to Anthropic Messages, the reviewed Responses roster to Responses, and
172
- // everything else to chat completions.
175
+ // everything else to chat completions. Every Grok Copilot has served since
176
+ // 4.5 is Responses-only (chat completions answers 400
177
+ // unsupported_api_for_model), so the line is matched by prefix — including
178
+ // the synthesized `-1m` long-context siblings — instead of one exact id per
179
+ // revision (#7096, #8807, #12901). grok-code-fast-1 carries no 4.x revision
180
+ // and stays on chat completions.
173
181
  api-routes provider="github-copilot" default="openai-completions" {
174
182
  route "anthropic-messages" glob="claude-haiku-*" glob="claude-sonnet-*" glob="claude-opus-*" \
175
183
  glob="claude-fable-*" glob="claude-mythos-*"
176
- route "openai-responses" exact="grok-4.5" exact="grok-4.6" prefix="gpt-5" prefix="gpt-6" prefix="oswe" prefix="mai-"
184
+ route "openai-responses" prefix="grok-4." prefix="gpt-5" prefix="gpt-6" prefix="oswe" prefix="mai-"
177
185
  }
178
186
  // Command Code serves Claude models through its Anthropic-compatible
179
187
  // Messages endpoint and every other model through chat completions.