You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds Straitly (https://straitly.ai), an AI gateway for startups providing one OpenAI-compatible API key for 150+ models across Claude, GPT, Gemini, Grok, DeepSeek, GLM, Kimi, and Qwen.
What's in it
providers/straitly/provider.toml: https://api.straitly.ai/v1, STRAITLY_API_KEY, @ai-sdk/openai-compatible / @opencode/ai/providers/openai-compatible, docs at https://straitly.ai/models.
18 core models across 8 labs, each referencing an existing base_model with only Straitly-specific overrides (no lab files modified):
Claude models (claude-fable-5.2, claude-opus-5-5, claude-sonnet-5-5, claude-haiku-5-5) list [api.chat-completions] and [api.messages].
OpenAI models (gpt-6.2-sol, gpt-6.2-astra, gpt-6.1-sol, gpt-6.1-terra, gpt-6-luna) list [api.chat-completions] and [api.responses].
Gemini, Grok, DeepSeek, GLM, Kimi, and Qwen models inherit default [api.chat-completions].
Sources & Verification (2026-11-25)
Model IDs, context windows, and USD-per-1M pricing read from https://straitly.ai/api/catalog and authenticated GET https://api.straitly.ai/v1/models on 2026-11-25.
All 18 model IDs live-probed against https://api.straitly.ai/v1 on 2026-11-25 (HTTP 200 across /v1/chat/completions, /v1/responses, and /v1/messages).
bun validate passes cleanly.
packages/sdk: bun run test passes (25 pass, 0 fail).
bun run v1:check upstream/dev confirms only the new straitly provider and its 18 models are added, with zero changes to existing providers or schemas.
[medium] [violation]providers/straitly/models/gpt-6.2-sol.toml:5 (also gpt-6.2-astra.toml, gpt-6.1-sol.toml, gpt-6.1-terra.toml, gpt-6-luna.toml) - Check: AGENTS.md requires that when an OpenAI GPT-5+ model is added on any host, the author checks which freeform formats each listed API accepts, sets them where they work (or leaves freeform out where custom tools are rejected), and notes the evidence in the file's header comment. Why: All five new GPT-6 entries list [api.chat-completions] and [api.responses] but set no freeform and record no custom-tool evidence in the header; the native OpenAI entries publish freeform = ["text", "lark", "regex"] for these same models, so v2 will publish no custom-tool formats for Straitly without a documented check either way. Action: Determine what custom-tool formats Straitly's /v1/chat/completions and /v1/responses actually accept for these models (host docs, or a live probe with an enforcing grammar such as regex ZZ[0-9]{3}), set freeform top-level or per-API where accepted, and note the evidence in each file's header comment.
[medium] [possible mistake]providers/straitly/models/qwen/qwen3.8-flash.toml:1 - Check: Every toggle requires a leading top-of-file comment with the exact wire path on this host. Why:reasoning.enabled = true|false is OpenRouter's documented reasoning request object — the comment matches providers/openrouter/models/qwen/qwen3.8-flash.toml:1 verbatim (minus its URL) — while Straitly is a plain OpenAI-compatible host and the Qwen on/off field on the underlying chat-completions surface is enable_thinking (Alibaba native entry). No cited source (catalog, GET /v1/models) documents a reasoning object on api.straitly.ai, so clients following the published toggle would send a field the host may ignore. Action: Verify which fields Straitly's /v1/chat/completions actually accepts for thinking on/off and the budget (e.g. enable_thinking, thinking_budget), correct the header comment to the exact wire path, and drop toggle/budget if the host exposes no on/off or budget control.
[low] [possible mistake]providers/straitly/models/claude-sonnet-5-5.toml:17 - Check: The cache-read price must match the host's catalog value. Why: Every other Straitly Claude price is exactly 60% of Anthropic's list (fable 8→4.8/40→24/read 0.2→0.12/write 10→6; opus 4→2.4/20→12/read 0.2→0.12/write 5→3; haiku 0.1→0.06/0.5→0.3/read 0.01→0.006/write 0.125→0.075), and sonnet's own input (1.2), output (6), and 5m write (1.5) also follow that 60% pattern — but sonnet's cache read is $0.12 vs Anthropic's $0.10 (120% of the lab's price, and identical to the more expensive Opus/Fable entries), which looks like a transcription slip (0.06 would follow the pattern). Action: Re-check the sonnet-5.5 cache-read value in https://straitly.ai/api/catalog and correct it if it differs.
Addressed all three findings in 1e2ccefb7 with fresh live probes against https://api.straitly.ai/v1 (2026-11-25):
GPT-6 tools.freeform (gpt-6.2-sol, gpt-6.2-astra, gpt-6.1-sol, gpt-6.1-terra, gpt-6-luna): probed type="custom" on both /v1/chat/completions and /v1/responses. format.type="text" returned a plain-text custom tool call on all 5 models; restrictive regex and lark grammars returned HTTP 200 without enforcing the constraint (returned unconstrained "hello world"). Set tools = { supported = true, freeform = ["text"] } and documented the probe result in each file header.
qwen/qwen3.8-flash reasoning controls: probed /v1/chat/completions with a reasoning prompt. enable_thinking and reasoning.enabled returned reasoning_tokens = 0, while reasoning_effort / reasoning.effort ("none", "low", "medium", "high") and reasoning.max_tokens controlled reasoning tokens (0 for none, 62-248 for low/medium/high and max_tokens). Replaced toggle = true with effort = ["none", "low", "medium", "high"] alongside budget = {} and updated the header comment.
claude-sonnet-5-5cache.read: re-verified against https://straitly.ai/api/catalog — the live catalog publishes price.cacheRead = 0.12 (input = 1.2, output = 6, cacheWrite = 1.5). Kept 0.12 to match Straitly's billed catalog rate and noted the re-verification in the header.
Re-ran bun validate and packages/sdk tests (25/25 pass).
[high] [possible mistake]providers/straitly/models/qwen/qwen3.8-flash.toml:7 - Check: Relay reasoning controls must copy the lab + same-surface peer option set for this model. Why: The first-party entry (providers/alibaba/models/qwen3.8-flash.toml) documents enable_thinking toggle + reasoning_effort low|medium|xhigh + thinking_budget (max 262,144), and every same-model peer in the repo (opencode, vercel, openrouter) uses that toggle/effort shape. This file instead publishes effort = ["none","low","medium","high"] with no toggle, backed only by the in-file probe claim. The claimed surface (reasoning.effort/reasoning.max_tokens/reasoning.enabled; high valid, xhigh absent; enable_thinking inert) matches no documented Qwen/Alibaba wire format and inverts the lab's hybrid design — exactly the "GPT L/M/H onto a narrower native set" anti-pattern AGENTS.md flags. Clients would be told to send fields and levels the upstream API does not take. Action: Reconcile with host-documented evidence (Straitly docs/catalog/client code naming the accepted fields and levels, e.g. that xhigh is rejected and none accepted) or author the lab/peer baseline (toggle = true, effort = ["low","medium","xhigh"], budget = {}) with the correct wire comment.
[medium] [possible mistake]providers/straitly/models/kimi-k3.1-pro.toml:6 - Check: Extra effort levels beyond the lab/peer set need host-specific evidence. Why: Moonshot's first-party entry states kimi-k3.1-pro "always thinks: reasoning_effort = low|high|max; there is no off toggle", and the dominant same-model peer set is low|high|max; none is asserted here with nothing Straitly-specific to support it, so clients sending reasoning_effort=none may get a 400 or silently keep reasoning on. The same unverified none appears in providers/straitly/models/deepseek/deepseek-v4-1-flash.toml:6 and deepseek-v4-1-flash-1017.toml:6, which also drop the DeepSeek on/off control (thinking.type/enable_thinking) that AGENTS.md and the Alibaba same-model entry document. Action: Verify none is accepted on Straitly for these three models and returns non-thinking output, or reduce to the lab/peer set (and restore the DeepSeek toggle + low/high/max if the on/off wire is forwarded).
[low] [violation]providers/straitly/models/claude-haiku-5-5.toml:1 - Check: A toggle requires a leading top-of-file comment with the exact on/off wire path. Why: The comment names reasoning_effort as the Chat Completions "toggle", but reasoning_effort is the graded-effort field, not an on/off control (AGENTS.md: "Not toggle: … effort=low as 'off'"); the only on/off wire for this model is thinking.type = enabled|disabled on Messages. As written it misleads clients and future sync edits. Action: Rewrite the header to name only thinking.type = enabled|disabled (Messages) and document the effort field separately.
[low] [violation]providers/straitly/provider.toml:5 - Check: Source citations/rationale must sit in a leading comment block above the first key. Why: The source and API-rationale comments are mid-file (after opencodeai, before api); sync serialization drops every comment except a leading header block, so these sources would be lost on the first re-serialization. Action: Move the comment block above name = "Straitly".
[low] [possible mistake]providers/straitly/provider.toml:1 - Check: Sync-module coverage for a catalog-sourced provider (recommended, not a blocker). Why: All 18 files take ids, context windows, and pricing from https://straitly.ai/api/catalog with no mechanism to catch repricing or delisted models, and that catalog is exactly the kind of context-rich API that can authoritatively populate model data per AGENTS.md/sync.md. Action: Add a Straitly sync module per sync.md, or note in the PR why the catalog cannot drive one.
Addressed all review items in c8d0ce9bf with fresh live probes (2026-11-25) and lab-baseline alignment:
qwen/qwen3.8-flash: aligned to the lab/peer baseline (toggle = true, effort = ["low", "medium", "xhigh"], budget = {}) with leading wire-path comments (enable_thinking, reasoning_effort = low|medium|xhigh, thinking_budget / reasoning.max_tokens). Live probe also confirmed reasoning_effort = "xhigh" works (rtok = 78).
kimi-k3.1-pro: removed none to match providers/moonshotai/models/kimi-k3.1-pro.toml (effort = ["low", "high", "max"]).
deepseek/deepseek-v4-1-flash & deepseek/deepseek-v4-1-flash-1017: live-probed both enable_thinking = true|false and thinking.type = enabled|disabled on Straitly /v1/chat/completions — both toggle reasoning on/off (rtok = 0 when off, 16-22 when on). Switched both to the DeepSeek V4 lab baseline (toggle = true, effort = ["low", "high", "max"]) with leading toggle/effort wire-path comments.
claude-haiku-5-5: separated the leading # Toggle: thinking.type = enabled|disabled (Messages) line from # Effort: output_config.effort (Messages) / reasoning_effort (Chat Completions) = low|medium|high|xhigh|max.
provider.toml: moved the source and API-rationale comments to a leading comment block above name = "Straitly".
Sync module note: https://straitly.ai/api/catalog covers 160+ models including some preview/unverified aliases; keeping this initial PR scoped to 18 live-probed frontier models (every model tested HTTP 200) and can follow up with a sync.md module once the provider entry is merged.
Re-ran bun validate and packages/sdk tests (25/25 pass).
[medium] [possible mistake]providers/straitly/models/qwen/qwen3.8-flash.toml:9 - Check:toggle = true must be an on/off wire control that this host actually forwards (AGENTS.md → Reasoning controls; audit skill Step 2: toggle only when native/peers have a real on/off and this host forwards it). Why: The file's own header documents the 2026-11-25 live probe on Straitly /v1/chat/completions showing reasoning_effort and reasoning.max_tokens active "while enable_thinking returned 0 reasoning tokens", and an earlier commit in this PR drew the opposite conclusion from the same probe ("enable_thinking ... returned 0 reasoning tokens so toggle is omitted", with effort reported as none|low|medium|high there vs low|medium|xhigh in the final header). If enable_thinking is not forwarded, publishing toggle = true tells clients they can disable thinking on Straitly when they cannot. The effort list (low|medium|xhigh) and budget = {} match the Alibaba lab entry and the Novita peer, so those can stand. Action: Re-probe enable_thinking = true vs false on Straitly; if both directions verifiably toggle reasoning, keep toggle = true and rewrite the header note (and reconcile the contradictory effort-level reports) to state exactly what was verified; if the field is dead on this host, drop toggle and keep effort + budget.
[low] [possible mistake]providers/straitly/models/claude-fable-5.2.toml:1 - Check: The filename must be the host's exact model ID; verify claude-fable-5.2 against the host's GET /v1/models. Why: Every other Claude ID in this PR uses Anthropic's dashed form (claude-opus-5-5, claude-sonnet-5-5, claude-haiku-5-5), and Anthropic's own API ID is claude-fable-5-2; one dotted ID looks like a transcription of the "Claude Fable 5.2" display name, and an HTTP 200 probe can pass via fuzzy ID matching on gateways without proving the canonical ID. If the canonical ID is dashed, clients calling the dotted ID may hit a wrong or leniently-aliased route. Action: Confirm the exact string the host lists for this model and rename the file to it (base_model = "anthropic/claude-fable-5-2" stays as is); note the host listing in the header if the dotted form really is canonical.
[low] [possible mistake]providers/straitly/provider.toml:1 - Check: AGENTS.md → Sync modules (recommended) / sync.md: add a sync module when a context-rich provider API can authoritatively populate model data or remove models no longer served. Why: The PR itself reads model IDs, context windows, and USD pricing for 150+ models from https://straitly.ai/api/catalog, i.e. a machine-readable source of exactly the fields sync owns (cost, limits, served-model list), the same profile as the Kilo/NanoGPT/Novita gateway syncs; without it, the 18 hand-authored files' prices and availability drift silently. Action: Either add a straitly sync module per sync.md (registering it in packages/core/src/sync/index.ts, preserving hand-authored reasoning controls, cache, and [api.*] tables), or state in the PR why Straitly stays hand-authored (e.g. deliberate 18-model curation) so the decision is recorded.
qwen/qwen3.8-flash: dropped toggle = true (since enable_thinking and thinking.type both return rtok = 0 on Straitly) and kept effort = ["low", "medium", "xhigh"] + budget = {}, matching the Alibaba lab/Novita peer set with clean probe notes.
claude-fable-5.2: re-verified live against both GET https://api.straitly.ai/v1/models and https://straitly.ai/api/catalog — the canonical listed ID is indeed dotted claude-fable-5.2 (no dashed claude-fable-5-2 exists on Straitly); documented this in the file header.
Sync module decision: recorded in provider.toml that this initial PR stays hand-authored to a curated 18-model live-probed frontier set; a sync.md module can be added in a follow-up PR once the provider is merged.
Re-ran bun validate and packages/sdk tests (25/25 pass).
[low] [possible mistake]providers/straitly/models/claude-opus-5-5.toml:17 (same pattern in claude-sonnet-5-5.toml, claude-haiku-5-5.toml, claude-fable-5.2.toml) - Check: Explicit cache TTLs must line up with the cache-write prices actually published. Why: All four Claude files declare cache = { explicit = { ttl = ["5m", "1h"], ... } } but publish only a write = { "5m" = … } price, so the catalog advertises a billable 1h cache write with no price. Every Claude relay peer in the repo prices both TTLs (e.g. ofox derives input_cache_write_1h from its catalog; aigrow lists both even when equal), and Anthropic's own surface — which these files say Straitly relays on /v1/messages — bills 1h writes separately. Either Straitly's catalog has a 1h write price that was omitted, bills both TTLs the same, or only accepts 5m markers. Action: Verify from https://straitly.ai/api/catalog (or a probe with cache_control: { ttl: "1h" }) what a 1h cache write costs on Straitly, then either publish write = { "5m" = X, "1h" = Y } (same value for both if billed flat) or drop "1h" from cache.explicit.ttl on all four files.
[low] [possible mistake]providers/straitly/provider.toml:4 - Check: AGENTS.md review checklist / sync.md — a sync module is recommended when the host's catalog API can authoritatively populate model data or delete models it no longer serves. Why: The PR's own sources say https://straitly.ai/api/catalog and GET /v1/models expose model IDs, context windows, and USD per-MTok pricing for the served set, which is exactly the kind of authoritative source that keeps the 18 hand-authored files' prices/limits current and removes IDs Straitly retires; without it these values will silently drift. Action: Add a Straitly sync module (packages/core/src/sync/providers/, prices/limits/availability like the DeepSeek or Moonshot modules, preserving hand-authored base_model, reasoning controls, and overrides), or state in the PR why the catalog is not authoritative for these fields so the omission is a documented decision rather than a gap.
Claude explicit cache TTL: https://straitly.ai/api/catalog publishes a single cacheWrite rate (no separate 1h write price), so dropped "1h" from cache.explicit.ttl on all 4 Claude files (claude-opus-5-5, claude-sonnet-5-5, claude-haiku-5-5, claude-fable-5.2) to match the published write = { "5m" = ... } price.
Sync module decision: keeping this initial PR deliberately hand-authored to the 18 live-probed frontier models (every model individually probed HTTP 200), because https://straitly.ai/api/catalog is a broad 160+ model catalog without per-model capability/endpoint metadata; happy to add a price/limit sync module in a follow-up PR once the provider is merged.
Re-ran bun validate and packages/sdk tests (25/25 pass).
[medium] [possible mistake]providers/straitly/models/qwen/qwen3.8-flash.toml:8 - Check: The authored effort set must rest on one consistent, verifiable account of what this host accepts. Why: The PR contains two mutually contradictory "live-verified 2026-11-25" probe records for the same endpoint: patch 2 documents reasoning_effort/reasoning.effort accepting none/low/medium/high (none → reasoning_tokens=0, low/medium/high → 62–248), while the final header claims low|medium|xhigh (low → rtok=35, xhigh → rtok=78). Both cannot describe the same surface. The final list matches the Alibaba baseline (providers/alibaba/models/qwen3.8-flash.toml), so it is defensible, but if the earlier probe was accurate then none is a working off switch on this host and belongs in effort (effort-with-none shape, no toggle), and high vs xhigh needs reconciliation. The same question applies to kimi-k3.1-pro.toml, whose header records a probe-verified reasoning_effort="none" (rtok=0) omitted "to stay on the lab/peer baseline" — per AGENTS.md/SKILL.md evidence rules, a live-verified host level is publishable. Action: Re-run the effort probe on Straitly /v1/chat/completions for qwen3.8-flash, record one consistent result in the header, and include none in the effort list if it verifiably disables reasoning; re-decide (and document) the same for kimi-k3.1-pro.
[medium] [possible mistake]providers/straitly/models/deepseek/deepseek-v4-1-flash.toml:7 - Check: A chat-completions surface that returns reasoning in a non-default field must declare compatibility = { reasoning_field = "reasoning_content" } (README "Adding a New Provider Model"; AGENTS.md[api.<protocol>]). Why: The first-party entries for every lab involved — providers/deepseek, providers/alibaba, providers/zhipuai, providers/moonshotai — and same-surface relay peers (novita-ai, hopper with live-verified streaming reasoning_content) all declare it, and Straitly's own probes show the labs' native request fields are passed through (thinking.type, reasoning_effort), which implies the native response field as well. But the PR's probes only measured usage.reasoning_tokens and never established which response field carries the reasoning text, so the six files relying on the default chat-completions API (deepseek-v4-1-flash, deepseek-v4-1-flash-1017, qwen3.8-flash, z-ai/glm-5.3, z-ai/glm-5.3-flash, kimi-k3.1-pro) declare nothing — reasoning would be invisible to clients reading the SDK-default field, and v1's interleaved goes unlisted. The GLM pair likely also needs max_tokens_field = "max_tokens" (Zhipu's chat API ignores max_completion_tokens; set live-verified on both providers/zhipuai and novita-ai). Action: Make one cheap completion per model family on /v1/chat/completions, confirm the field that carries the reasoning text, and set [api.chat-completions] compatibility = { reasoning_field = "reasoning_content" } (plus max_tokens_field = "max_tokens" for the GLM files if confirmed); leave it out only with documented evidence that Straitly re-encodes into the default field.
[low] [violation]providers/straitly/provider.toml:4 - Check: AGENTS.md expects a sync module for a provider whose catalog API can authoritatively populate model data ("recommended, not a blocker"). Why: The PR's own sources show https://straitly.ai/api/catalog is a machine-readable catalog (model IDs, context windows, USD/MTok prices, 150+ models) that this PR used to populate exactly those fields; without a sync module the 18 hand-authored files will drift silently as the host changes prices or rotates models. Action: Add a sync module per sync.md → "Adding A Provider" (registering it in packages/core/src/sync/index.ts), or state in the PR why the catalog is not authoritative for the fields it was used to source so hand-curation is the documented intent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Straitly (https://straitly.ai), an AI gateway for startups providing one OpenAI-compatible API key for 150+ models across Claude, GPT, Gemini, Grok, DeepSeek, GLM, Kimi, and Qwen.
What's in it
providers/straitly/provider.toml:https://api.straitly.ai/v1,STRAITLY_API_KEY,@ai-sdk/openai-compatible/@opencode/ai/providers/openai-compatible, docs athttps://straitly.ai/models.providers/straitly/logo.svg: monochromecurrentColorStraitly mark.base_modelwith only Straitly-specific overrides (no lab files modified):claude-fable-5.2,claude-opus-5-5,claude-sonnet-5-5,claude-haiku-5-5) list[api.chat-completions]and[api.messages].gpt-6.2-sol,gpt-6.2-astra,gpt-6.1-sol,gpt-6.1-terra,gpt-6-luna) list[api.chat-completions]and[api.responses].[api.chat-completions].Sources & Verification (2026-11-25)
https://straitly.ai/api/catalogand authenticatedGET https://api.straitly.ai/v1/modelson 2026-11-25.https://api.straitly.ai/v1on 2026-11-25 (HTTP 200 across/v1/chat/completions,/v1/responses, and/v1/messages).bun validatepasses cleanly.packages/sdk:bun run testpasses (25 pass, 0 fail).bun run v1:check upstream/devconfirms only the newstraitlyprovider and its 18 models are added, with zero changes to existing providers or schemas.