@oh-my-pi/pi-catalog 18.2.8 → 18.2.9
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 +16 -0
- package/dist/types/compat/auth-ids.d.ts +2 -2
- package/dist/types/compat/axes.d.ts +2 -2
- package/dist/types/compat/catalog-policy.d.ts +7 -0
- package/dist/types/compat/output-limits.d.ts +3 -0
- package/dist/types/compat/provider-ids.d.ts +1 -1
- package/dist/types/compat/tools.d.ts +5 -0
- package/dist/types/provider-models/openai-compat.d.ts +26 -0
- package/dist/types/wire/singularityapi.d.ts +29 -0
- package/package.json +4 -4
- package/src/compat/auth-ids.ts +4 -0
- package/src/compat/axes.ts +21 -2
- package/src/compat/catalog-policy.ts +28 -0
- package/src/compat/output-limits.ts +12 -0
- package/src/compat/provider-ids.ts +2 -0
- package/src/compat/resolve.ts +4 -2
- package/src/compat/rules/README.md +10 -10
- package/src/compat/rules/auth/_order.kdl +1 -1
- package/src/compat/rules/auth/singularityapi-dev.kdl +22 -0
- package/src/compat/rules/auth/singularityapi-tech.kdl +23 -0
- package/src/compat/rules/classes/gpt-oss.kdl +3 -0
- package/src/compat/rules/classes/xai.kdl +3 -3
- package/src/compat/rules/providers/amazon-bedrock.kdl +1 -1
- package/src/compat/rules/providers/anthropic.kdl +1 -1
- package/src/compat/rules/providers/cloudflare-ai-gateway.kdl +1 -1
- package/src/compat/rules/providers/commandcode.kdl +1 -1
- package/src/compat/rules/providers/cursor.kdl +1 -1
- package/src/compat/rules/providers/google-antigravity.kdl +5 -0
- package/src/compat/rules/providers/kilo.kdl +1 -1
- package/src/compat/rules/providers/litellm.kdl +1 -1
- package/src/compat/rules/providers/native-tools.kdl +4 -0
- package/src/compat/rules/providers/opencode-zen.kdl +1 -1
- package/src/compat/rules/providers/output-limits.kdl +4 -0
- package/src/compat/rules/providers/singularityapi-dev.kdl +92 -0
- package/src/compat/rules/providers/singularityapi-tech.kdl +72 -0
- package/src/compat/rules/providers/tool-free-history.kdl +6 -0
- package/src/compat/rules/providers/vercel-ai-gateway.kdl +1 -1
- package/src/compat/rules/providers/xai-oauth.kdl +8 -1
- package/src/compat/rules/providers/xai.kdl +4 -4
- package/src/compat/rules/providers/xiaomi-token-plan-cn.kdl +23 -0
- package/src/compat/rules/providers/zenmux.kdl +1 -1
- package/src/compat/rules/runtime/behavior.kdl +2 -0
- package/src/compat/rules.json +1 -12526
- package/src/compat/tools.ts +12 -0
- package/src/discovery/devin.ts +59 -36
- package/src/models.json +1 -1
- package/src/provider-models/cache-provider-id.ts +31 -0
- package/src/provider-models/descriptors.ts +4 -0
- package/src/provider-models/openai-compat.ts +159 -0
- package/src/wire/singularityapi.ts +34 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// SingularityAPI universal inference gateway (api.singularityapi.dev):
|
|
2
|
+
// one OpenAI-compatible endpoint for 300+ models (DeepSeek, Kimi, GLM,
|
|
3
|
+
// frontier flagships), `sapi_...` bearer keys issued from the dashboard at
|
|
4
|
+
// app.singularityapi.dev. `GET /v1/models` publishes each row's per-endpoint
|
|
5
|
+
// capabilities — context window, max/default output tokens, and per-million
|
|
6
|
+
// 12-decimal pricing strings — with `cache-control: no-store`, so discovery
|
|
7
|
+
// reads limits and tariffs live and no rows are frozen here.
|
|
8
|
+
//
|
|
9
|
+
// Deliberately no `discovery` node: live discovery needs a user credential,
|
|
10
|
+
// and enrolling would freeze one account's snapshot into models.json on every
|
|
11
|
+
// credential-less regen. The provider stays runtime-only and
|
|
12
|
+
// `dynamic-models-authoritative` prunes stale rows.
|
|
13
|
+
// The vendor's second product — slot-reserved DeepSeek lanes on
|
|
14
|
+
// api.singularityapi.tech — lives in `singularityapi-tech`: separate provider
|
|
15
|
+
// id because the two gateways publish conflicting effort ladders (`max`
|
|
16
|
+
// passes there and 400s here; `medium` is the reverse, both measured live
|
|
17
|
+
// 2026-09-22) and neither key works on the other host.
|
|
18
|
+
provider "singularityapi-dev" {
|
|
19
|
+
default-model "deepseek-v4-flash"
|
|
20
|
+
env "SINGULARITYAPI_DEV_API_KEY"
|
|
21
|
+
dynamic-models-authoritative #true
|
|
22
|
+
|
|
23
|
+
// Gateway-wide request shape, from the OpenAI-compatibility contract
|
|
24
|
+
// (docs.singularityapi.dev/get-started/open-ai-compatibility): chat
|
|
25
|
+
// completions accept `max_tokens` and `max_completion_tokens`
|
|
26
|
+
// interchangeably; the gateway normalizes to the model's canonical
|
|
27
|
+
// field. Unknown/reserved fields 400 instead of dropping, duplicate
|
|
28
|
+
// JSON keys and NaN/Infinity 400, context overflow 400s before spend.
|
|
29
|
+
// Rows the `models` rules below do not review inherit exactly this
|
|
30
|
+
// shape instead of the openai-completions default, because the roster
|
|
31
|
+
// is account-scoped and unreviewed model ids are expected.
|
|
32
|
+
max-tokens-field "max_tokens"
|
|
33
|
+
|
|
34
|
+
// Reviewed lane rules for the DeepSeek rows the gateway publishes,
|
|
35
|
+
// keyed as case-insensitive globs (`models` exact selectors compare the
|
|
36
|
+
// raw id verbatim while the compiler lowercases them, so exact rules
|
|
37
|
+
// can never match mixed-case wire ids). DeepSeek V4 Flash rows classify
|
|
38
|
+
// deepseek/flash by taxonomy but publish no reasoning metadata, so the
|
|
39
|
+
// upgrade rule owns the measured low/medium/high ladder; reasoning arrives
|
|
40
|
+
// as top-level `reasoning_content` on messages and streamed deltas, and
|
|
41
|
+
// `none` forces it off. V4 Pro the same, with the Pro ladder.
|
|
42
|
+
//
|
|
43
|
+
// Ladder measured against the live gateway 2026-09-22: `none`, `minimal`,
|
|
44
|
+
// `low`, `medium`, `high` pass admission while `xhigh`, `max`, integer and
|
|
45
|
+
// unknown efforts answer 400 `invalid_request` — admission validation runs
|
|
46
|
+
// before the credit reservation, so the probe sorted accepted from rejected
|
|
47
|
+
// at 402 vs 400 without spending a cent. `max` in particular is a
|
|
48
|
+
// reserve-lane-only tier (`singularityapi-tech`); sending it here turned
|
|
49
|
+
// every DeepSeek request into a 400.
|
|
50
|
+
models "*deepseek-v4-flash*" {
|
|
51
|
+
thinking-upgrade-neutral #true
|
|
52
|
+
max-tokens-field "max_tokens"
|
|
53
|
+
thinking-efforts "low" "medium" "high"
|
|
54
|
+
reasoning-disable-mode "none-effort"
|
|
55
|
+
reasoning-content-field "reasoning_content"
|
|
56
|
+
}
|
|
57
|
+
models "*deepseek-v4-pro*" {
|
|
58
|
+
thinking-upgrade-neutral #true
|
|
59
|
+
max-tokens-field "max_tokens"
|
|
60
|
+
thinking-efforts "low" "medium" "high"
|
|
61
|
+
reasoning-disable-mode "none-effort"
|
|
62
|
+
reasoning-content-field "reasoning_content"
|
|
63
|
+
}
|
|
64
|
+
// Responses-capable flagships (gpt-5.6-sol/terra/luna): five-tier
|
|
65
|
+
// low..max ladder with the wire-exact off switch, matching the
|
|
66
|
+
// first-party GPT-5.6 rows. `thinking-upgrade-neutral` is what makes the
|
|
67
|
+
// ladder real: the wire publishes no reasoning metadata, so without it the
|
|
68
|
+
// rows stay non-reasoning and omp sends no `reasoning_effort` at all —
|
|
69
|
+
// which the gateway rejects (400 from upstream) on chat completions
|
|
70
|
+
// whenever `tools` are present, exactly the case a coding agent hits.
|
|
71
|
+
models "gpt-5.6-sol" "gpt-5.6-terra" "gpt-5.6-luna" {
|
|
72
|
+
thinking-upgrade-neutral #true
|
|
73
|
+
thinking-efforts "low" "medium" "high" "xhigh" "max"
|
|
74
|
+
reasoning-disable-mode "none-effort"
|
|
75
|
+
}
|
|
76
|
+
// Gateway image models serve POST /v1/images/generations, never billed
|
|
77
|
+
// by tokens: FLUX per megapixel, GPT Image per image. The `kind` rules
|
|
78
|
+
// keep them out of chat; `mapSingularityApiModel` reads the same rows'
|
|
79
|
+
// `capabilities` and assigns the `openai-images` transport, so a new
|
|
80
|
+
// image id the roster adds works without a rule edit here.
|
|
81
|
+
models "flux-1-schnell" "flux-pro-1.1" {
|
|
82
|
+
kind "image"
|
|
83
|
+
}
|
|
84
|
+
models "gpt-image-2" "gpt-image-1.5" {
|
|
85
|
+
kind "image"
|
|
86
|
+
}
|
|
87
|
+
// The gateway's DeepSeek rows reject tool_choice: the API defaults to
|
|
88
|
+
// auto when tools exist. Matches the first-party DeepSeek transport.
|
|
89
|
+
models "*deepseek*" {
|
|
90
|
+
supports-tool-choice #false
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// SingularityAPI reserved DeepSeek lanes (api.singularityapi.tech, a LiteLLM
|
|
2
|
+
// front end for slot-reserved lanes). This is the vendor's other product —
|
|
3
|
+
// see `singularityapi-dev` for the pay-as-you-go universal gateway — split
|
|
4
|
+
// out because the two gateways publish conflicting effort ladders: `max` is
|
|
5
|
+
// valid here and400s there, `medium` is rejected here and accepted there
|
|
6
|
+
// (both measured live 2026-09-22). Usage bills against a booked reservation
|
|
7
|
+
// slot, so a valid key with no active slot answers 403 `permission_error`
|
|
8
|
+
// ("No active lane reservation for this key", verified 2026-09-22): login
|
|
9
|
+
// succeeds while a slot is idle, inference waits for one.
|
|
10
|
+
//
|
|
11
|
+
// The live `/v1/models` roster owns membership: keys are lane-scoped `sk-...`
|
|
12
|
+
// bearer tokens issued from the dashboard, and a bogus key is rejected with
|
|
13
|
+
// 401 `token_not_found_in_db` (verified 2026-09-21), so no rows are frozen
|
|
14
|
+
// here. Deliberately no `discovery` node: that node enrolls a provider in
|
|
15
|
+
// generate-models.ts, which would freeze one account's lane snapshot into
|
|
16
|
+
// models.json on every credential-less regen. The roster is per-key
|
|
17
|
+
// credential-scoped, so `singularityApiTechModelManagerOptions` keys its
|
|
18
|
+
// authoritative cache on both the resolved credential and the endpoint;
|
|
19
|
+
// `dynamic-models-authoritative` prunes stale rows.
|
|
20
|
+
provider "singularityapi-tech" {
|
|
21
|
+
default-model "deepseek-ai/DeepSeek-V4.1-Flash"
|
|
22
|
+
env "SINGULARITYAPI_TECH_API_KEY"
|
|
23
|
+
dynamic-models-authoritative #true
|
|
24
|
+
|
|
25
|
+
// Gateway-wide request shape. The deployment fronts DeepSeek lanes only and
|
|
26
|
+
// its front end takes `max_tokens`, returning reasoning as top-level
|
|
27
|
+
// `reasoning_content` on the final message and on streamed deltas (verified
|
|
28
|
+
// live 2026-09-22). A lane row that no `models` rule below matches inherits
|
|
29
|
+
// exactly this shape instead of the openai-completions default
|
|
30
|
+
// (`max_completion_tokens`), because the roster is per-key and unreviewed
|
|
31
|
+
// lanes are expected.
|
|
32
|
+
max-tokens-field "max_tokens"
|
|
33
|
+
reasoning-content-field "reasoning_content"
|
|
34
|
+
|
|
35
|
+
// Model guide (dashboard): the lane runs DeepSeek V4.1 Flash. Send
|
|
36
|
+
// `deepseek-ai/DeepSeek-V4.1-Flash`; the short alias
|
|
37
|
+
// `deepseek-v4.1-flash` is accepted too, and the account also serves the
|
|
38
|
+
// dated V4 Flash row. Context is 262,144 tokens prompt+completion (not the
|
|
39
|
+
// documented 1M); an overflowing max_tokens is reduced automatically, and a
|
|
40
|
+
// prompt within ~1K of the limit 400s. Both ids classify deepseek/flash by
|
|
41
|
+
// taxonomy, but bare `/v1/models` rows carry no reasoning metadata, so
|
|
42
|
+
// neutral discovery would leave the effort dial dark.
|
|
43
|
+
// Glob, not `exact`: one lane ships as a `deepseek-ai/…` id, a dated `-0731`
|
|
44
|
+
// row and a short alias, and cascade globs match the lowercased id, so one
|
|
45
|
+
// pattern covers each spelling where `exact` compares the raw id verbatim.
|
|
46
|
+
models "*deepseek-v4-flash-0731" "*deepseek-v4.1-flash" {
|
|
47
|
+
thinking-upgrade-neutral #true
|
|
48
|
+
// Effort vocabulary measured against the live gateway 2026-09-22:
|
|
49
|
+
// `none`, `minimal`, `low`, `high`, `xhigh`, `max` pass admission;
|
|
50
|
+
// `medium` and integer efforts 400 even though the gateway's own
|
|
51
|
+
// rejected-variant text lists `medium` as valid, so the guide's
|
|
52
|
+
// integer 1-100 scale does not survive the forward path. The ladder
|
|
53
|
+
// below is the accepted named set, `none` owns the off position.
|
|
54
|
+
thinking-efforts "low" "high" "xhigh" "max"
|
|
55
|
+
reasoning-disable-mode "none-effort"
|
|
56
|
+
// Guide: an overflowing max_tokens is reduced automatically, so clamp the
|
|
57
|
+
// request to the lane's ceiling rather than let the gateway answer 400.
|
|
58
|
+
// Lane-scoped, not provider-wide: for a row whose ceiling discovery leaves
|
|
59
|
+
// unknown the clamp falls back to the OpenAI default ceiling, which is not
|
|
60
|
+
// something an unreviewed lane should inherit.
|
|
61
|
+
clamp-output-to-model-max #true
|
|
62
|
+
// Guide: up to 8 image_url parts per request (PNG/JPEG, data URL or
|
|
63
|
+
// public https). Declared here as well as clearing the class strip:
|
|
64
|
+
// live discovery seeds input ["text"], and the wire guard requires the
|
|
65
|
+
// declared modality.
|
|
66
|
+
input-modalities "text" "image"
|
|
67
|
+
strip-image-input #false
|
|
68
|
+
limits-patch {
|
|
69
|
+
context-window 262144
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Bedrock injects a callable sentinel when tool-free requests retain tool history, but the
|
|
2
|
+
// sentinel is model-visible and calling it ends the turn: a genuine tool opt-out needs
|
|
3
|
+
// history without prior tool calls or results. Applies to every routed Bedrock deployment.
|
|
4
|
+
on-api "bedrock-converse-stream" {
|
|
5
|
+
requires-tool-free-history-for-tool-opt-out #true
|
|
6
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Provider-wire compat for "vercel-ai-gateway"; regenerated from the frozen census using deployment contract selectors.
|
|
2
2
|
|
|
3
3
|
provider "vercel-ai-gateway" {
|
|
4
|
-
default-model "anthropic/claude-opus-
|
|
4
|
+
default-model "anthropic/claude-opus-5"
|
|
5
5
|
env "AI_GATEWAY_API_KEY"
|
|
6
6
|
discovery label="Vercel AI Gateway" allow-unauthenticated=#true {
|
|
7
7
|
env "VERCEL_AI_GATEWAY_API_KEY"
|
|
@@ -58,6 +58,13 @@ provider "xai-oauth" {
|
|
|
58
58
|
cost input=0 output=0 cache-read=0 cache-write=0
|
|
59
59
|
limits context=500000 max-tokens=500000
|
|
60
60
|
}
|
|
61
|
+
// 500K context per docs.x.ai/developers/models/grok-4.7.
|
|
62
|
+
model "grok-4.7" name="Grok 4.7" {
|
|
63
|
+
reasoning #true
|
|
64
|
+
input "text" "image"
|
|
65
|
+
cost input=0 output=0 cache-read=0 cache-write=0
|
|
66
|
+
limits context=500000 max-tokens=500000
|
|
67
|
+
}
|
|
61
68
|
// Text-only per the bundled catalog.
|
|
62
69
|
model "grok-4.20-multi-agent-0309" name="Grok 4.20 (Multi-Agent)" {
|
|
63
70
|
reasoning #true
|
|
@@ -144,7 +151,7 @@ provider "xai-oauth" {
|
|
|
144
151
|
supports-reasoning-effort #false
|
|
145
152
|
}
|
|
146
153
|
// xhigh-capable SKUs keep xhigh unmapped.
|
|
147
|
-
models "grok-4.6*" "grok-4.20-multi-agent*" priority=1 {
|
|
154
|
+
models "grok-4.6*" "grok-4.7*" "grok-4.20-multi-agent*" priority=1 {
|
|
148
155
|
reasoning-effort-map {
|
|
149
156
|
minimal "low"
|
|
150
157
|
}
|
|
@@ -49,14 +49,14 @@ provider "xai" {
|
|
|
49
49
|
thinking-mode "effort"
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
// Dormant until a catalog snapshot ships grok-4.
|
|
52
|
+
// Dormant until a catalog snapshot ships grok-4.7; xhigh is native there.
|
|
53
53
|
// The effort-capable allowlist accepts the wire reasoning.effort dial;
|
|
54
|
-
// xhigh-capable SKUs (4.6, multi-agent) keep xhigh unmapped.
|
|
55
|
-
models "grok-3-mini*" "grok-4.20-multi-agent*" "grok-4.3*" "grok-4.5*" "grok-4.6*" {
|
|
54
|
+
// xhigh-capable SKUs (4.6, 4.7, multi-agent) keep xhigh unmapped.
|
|
55
|
+
models "grok-3-mini*" "grok-4.20-multi-agent*" "grok-4.3*" "grok-4.5*" "grok-4.6*" "grok-4.7*" {
|
|
56
56
|
supports-reasoning-effort #true
|
|
57
57
|
omit-reasoning-effort #false
|
|
58
58
|
}
|
|
59
|
-
models "grok-4.20-multi-agent*" "grok-4.6*" priority=1 {
|
|
59
|
+
models "grok-4.20-multi-agent*" "grok-4.6*" "grok-4.7*" priority=1 {
|
|
60
60
|
reasoning-effort-map {
|
|
61
61
|
minimal "low"
|
|
62
62
|
}
|
|
@@ -4,6 +4,29 @@ provider "xiaomi-token-plan-cn" {
|
|
|
4
4
|
default-model "mimo-v2.5"
|
|
5
5
|
env "XIAOMI_TOKEN_PLAN_CN_API_KEY"
|
|
6
6
|
|
|
7
|
+
// Xiaomi's credential-scoped roster returns bare ids, so these documented
|
|
8
|
+
// V2.6 capabilities must remain authoritative across online refreshes.
|
|
9
|
+
seed api="openai-completions" base-url="https://token-plan-cn.xiaomimimo.com/v1" bundle="always" precedence="seed" {
|
|
10
|
+
model "mimo-v2.6-pro" name="MiMo-V2.6-Pro" {
|
|
11
|
+
reasoning #true
|
|
12
|
+
input "text" "image"
|
|
13
|
+
cost input=0 output=0 cache-read=0 cache-write=0
|
|
14
|
+
limits context=1048576 max-tokens=131072
|
|
15
|
+
}
|
|
16
|
+
model "mimo-v2.6-flash" name="MiMo-V2.6-Flash" {
|
|
17
|
+
reasoning #true
|
|
18
|
+
input "text" "image"
|
|
19
|
+
cost input=0 output=0 cache-read=0 cache-write=0
|
|
20
|
+
limits context=1048576 max-tokens=131072
|
|
21
|
+
}
|
|
22
|
+
model "mimo-v2.6-pro-ultraspeed" name="MiMo-V2.6-Pro-Ultraspeed" {
|
|
23
|
+
reasoning #true
|
|
24
|
+
input "text" "image"
|
|
25
|
+
cost input=0 output=0 cache-read=0 cache-write=0
|
|
26
|
+
limits context=1048576 max-tokens=131072
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
7
30
|
class "mimo" {
|
|
8
31
|
family "v2" {
|
|
9
32
|
thinking-mode "effort"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Provider-wire compat for "zenmux"; regenerated from the frozen census using deployment contract selectors.
|
|
2
2
|
|
|
3
3
|
provider "zenmux" {
|
|
4
|
-
default-model "anthropic/claude-opus-
|
|
4
|
+
default-model "anthropic/claude-opus-5"
|
|
5
5
|
env "ZENMUX_API_KEY"
|
|
6
6
|
allow-unauthenticated #true
|
|
7
7
|
discovery label="ZenMux" allow-unauthenticated=#true
|
|
@@ -197,6 +197,7 @@ behavior {
|
|
|
197
197
|
// at /responses (#10610, #12030). The Muse prefix covers gateway-first
|
|
198
198
|
// revisions; exact ids stay as cache-migration identity.
|
|
199
199
|
api-routes provider="opencode-zen" {
|
|
200
|
+
route "anthropic-messages" exact="union-alpha"
|
|
200
201
|
route "openai-responses" prefix="muse-spark-" exact="muse-spark-1.3-contributor-free" exact="gpt-6-astra"
|
|
201
202
|
route "openai-completions" exact="minimax-m3" exact="minimax-m3-free"
|
|
202
203
|
}
|
|
@@ -204,6 +205,7 @@ behavior {
|
|
|
204
205
|
// responses pins are gateway-verified (deepseek-v4-flash 2026-08-08;
|
|
205
206
|
// muse-spark per opencode.ai/docs/go/#endpoints, #8957, #10610).
|
|
206
207
|
api-routes provider="opencode-go" {
|
|
208
|
+
route "anthropic-messages" exact="union-alpha"
|
|
207
209
|
route "openai-responses" prefix="muse-spark-" exact="deepseek-v4-flash" exact="muse-spark-1.2" \
|
|
208
210
|
exact="muse-spark-1.2-contributor" exact="muse-spark-1.3" exact="muse-spark-1.3-contributor"
|
|
209
211
|
route "openai-completions" exact="minimax-m2.7" exact="minimax-m3" exact="minimax-m3-free" \
|