Skip to content

feat(boostrail): add BoostRail provider (9 models) with price sync - #10362

Open
leegao6072-watershed wants to merge 4 commits into
anomalyco:devfrom
boostrail:add-boostrail-provider
Open

leegao6072-watershed wants to merge 4 commits into
anomalyco:devfrom
boostrail:add-boostrail-provider

Conversation

@leegao6072-watershed

@leegao6072-watershed leegao6072-watershed commented Oct 18, 2026 •

Copy link
Copy Markdown

Adds BoostRail, an OpenAI-compatible model API, as a provider with 8 models and a price sync module. I work on BoostRail.

Provider

name = "BoostRail"
env = ["BOOSTRAIL_API_KEY"]
npm = "@ai-sdk/openai-compatible"
opencodeai = "@opencode/ai/providers/openai-compatible"
api = "https://api.boostrail.com/v1"
doc = "https://www.boostrail.com/docs/"

logo.svg uses currentColor, a square 0 0 24 24 viewBox and no fixed size.

Models

BoostRail is a multi-model relay: every file is schema = 2, base_model plus overrides, and all 8 lab entries already exist under models/. BoostRail forwards reasoning_effort and thinking unchanged to the route serving the model, so reasoning controls copy the lab entries, as AGENTS.md asks for relays.

BoostRail ID base_model Input / output / cache read (USD per 1M) Reasoning on this API
claude-sonnet-5 anthropic/claude-sonnet-5 1.9 / 9.5 / 0.19 effort low, medium, high, xhigh, max
claude-opus-5 anthropic/claude-opus-5 4.75 / 23.75 / 0.475 effort low, medium, high, xhigh, max
claude-haiku-4.5 anthropic/claude-haiku-4-5 0.95 / 4.75 / 0.095 budget, min 1024 (thinking.budget_tokens)
gpt-5.4 openai/gpt-5.4 2.375 / 14.25 / 0.2375 effort none, low, medium, high, xhigh
deepseek-v4-pro deepseek/deepseek-v4-pro 0.627 / 1.881 / 0.154 effort none, low, high, max
deepseek-v4.1-flash deepseek/deepseek-v4.1-flash 0.15 / 0.6 / 0.018 effort none, low, high, max
kimi-k2.7-code moonshotai/kimi-k2.7-code 0.9025 / 3.8 / 0.1805 always on, no control
glm-5.2 zhipuai/glm-5.2 1.045 / 3.284286 / 0.1045 effort none, high, max

Overrides besides cost:

  • none is listed only where a live request showed it turns thinking off on this API (DeepSeek V4 Pro, DeepSeek V4.1 Flash, GLM-5.2; GPT-5.4 has it natively).
  • The three Claude models drop application/pdf from input, and kimi-k2.7-code drops video: a PDF file content part did not reach the Claude models, and this API takes text and image_url parts only. gpt-5.4 read the PDF and keeps the inherited input.
  • gpt-5.4 has no freeform: a custom tool with regex grammar ZZ[0-9]{3} came back as a function call with input "any value".
  • cache.write equals the input price, because cache writes are not billed separately. No cache capability flags are claimed.
  • Context and output limits are inherited.

Price sync

packages/core/src/sync/providers/boostrail.ts reads https://www.boostrail.com/models.json, a static file built from the same data as https://www.boostrail.com/models/ (USD per 1M tokens, including cache_write). It follows the Ofox sync: skipCreates, deleteMissing: false, and it only rewrites cost; when the list omits a cache price, the authored one is kept (packages/core/test/boostrail.test.ts). Listed models without a local file appear in the sync notices; further models will come as hand-authored PRs. The provider is in the aggregators group, and bun run boostrail:sync is added to package.json.

Validation

  • bun validate passes.
  • bun run v1:check: the only v1 changes are additions, the new provider and its 8 models; no existing v1 field changes.
  • bun ./packages/core/script/sync-models.ts boostrail --dry-run against the live price list: 0 created, 0 updated, 0 removed, 8 unchanged.
  • packages/core/test/boostrail.test.ts passes. bun test packages/core shows the same 11 failures as dev without this change (none in these files); packages/sdk tests pass.
  • Live requests to POST /v1/chat/completions: on 2026-10-19, 3 trials per setting across reasoning_effort, thinking and reasoning.enabled, plus image and PDF input (ranges in each file header); on 2026-11-10, reasoning_effort = none on GLM-5.2 (3 trials) and a regex-grammar custom tool on GPT-5.4.

Sources: model prices, price list JSON, Chat Completions reference, docs.

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/boostrail/models/claude-sonnet-5.toml:9 - Check: Relay must copy lab + same-surface peer reasoning controls, not [] from uncertainty. Why: Lab providers/anthropic/models/claude-sonnet-5.toml has toggle + low/medium/high/xhigh/max and providers/openrouter/models/anthropic/claude-sonnet-5.toml has none/low/medium/high/xhigh/max, but PR sets [] from only none|low|high token counts (71-75) without testing medium/xhigh/max or toggle/budget paths. Action: Replace [] with the peer-aligned effort set or provide affirmative no-control proof covering all native/peer wires.
  • [high] [violation] providers/boostrail/models/claude-opus-5.toml:9 - Check: Same baseline rule for [] on relays. Why: Lab providers/anthropic/models/claude-opus-5.toml (low/medium/high/xhigh/max) and providers/openrouter/models/anthropic/claude-opus-5.toml (none/low/medium/high/xhigh/max) show controls, while PR's own note 42|27|58 shows 2x variation yet claims "no effective caller control" from only none|low|high. Action: Replace [] with peer-aligned effort controls or prove with full-level tests that reasoning_effort has no meaningful effect.
  • [high] [possible mistake] providers/boostrail/models/claude-haiku-4.5.toml:9 - Check: reasoning = false override must reflect host actually disabling reasoning. Why: Lab models/anthropic/claude-haiku-4-5.toml is reasoning = true, first-party is budget_tokens, and providers/openrouter/models/anthropic/claude-haiku-4.5.toml is toggle; PR tested only reasoning_effort (wrong wire for Anthropic budget/reasoning.enabled) and a 5-token answer does not prove no thinking. Action: Verify via the correct toggle/budget wire and restore reasoning = true with appropriate reasoning_options, or prove the host strips thinking.
  • [high] [possible mistake] providers/boostrail/models/glm-5.2.toml:9 - Check: Effort set must match lab baseline unless host difference is proven. Why: First-party providers/zhipuai/models/glm-5.2.toml is high/max (with low|medium→high, xhigh→max), but PR sets none/high, drops max untested, adds none, and own numbers 2|221|156 contradict "low is served as high" (221 vs 156). Action: Test max/xhigh/low distinctly and align to verified effective levels; do not drop max or collapse low without proof.
  • [high] [possible mistake] providers/boostrail/models/deepseek-v4.1-flash.toml:8 - Check: Do not drop lab/peer effort levels without testing them. Why: Native providers/deepseek/models/deepseek-v4-flash.toml (toggle + low/high/max) and providers/openrouter/models/deepseek/deepseek-v4.1-flash.toml (none/low/high/max) both include max, but PR sets none/low/high from only none|low|high (2|62|80) with max untested. Action: Test max (and toggle forwarding) and include it if accepted.
  • [medium] [possible mistake] providers/boostrail/models/gpt-5.4.toml:9 - Check: GPT-relay effort must include native/peer xhigh unless proven unsupported. Why: Both providers/openai/models/gpt-5.4.toml and providers/openrouter/models/openai/gpt-5.4.toml include xhigh; PR drops it as "accepted but served as high" (accepted implies listable) and never tests medium/xhigh (only 5|21|55 for none|low|high). Action: Include xhigh or prove the host rejects it; verify medium effect.
  • [medium] [possible mistake] providers/boostrail/models/deepseek-v4-pro.toml:8 - Check: DeepSeek V4 baseline is not invented L/M/H; verify toggle and low vs max vs xhigh. Why: First-party is toggle + low/high/max while providers/openrouter/models/deepseek/deepseek-v4-pro.toml is none/high/xhigh; PR picks none/high/max (adds none, drops low/toggle, picks max over xhigh) testing only none|high|max (1|70|187). Action: Test low, xhigh, and thinking.type forwarding and author the verified intersection (with leading wire comment if toggle is kept).
  • [medium] [possible mistake] providers/boostrail/models/claude-sonnet-5.toml:12 - Check: [modalities] override must be a genuine host delta. Why: Labs and OpenRouter preserve pdf for Claude/gpt-5.4, but PR drops to ["text","image"] for 3x Claude + gpt-5.4 based only on "text and image_url parts" without PDF-rejection proof; kimi-k2.7-code drop to image-only is peer-corroborated, Claude/GPT is not. Action: Prove PDF input is rejected/unsupported on api.boostrail.com/v1/chat/completions or restore pdf.
  • [medium] [violation] packages/core/src/sync/providers/boostrail.ts:174 - Check: Price-only sync must not fabricate cost keys the source does not publish. Why: Source schema is only input/output/cache_read, yet buildBoostRailModel unconditionally sets cache_write = input, overwriting hand-authored values and inventing a price. Action: Omit cache_write when the price list omits it and preserve the authored value instead.
  • [low] [possible mistake] packages/core/src/sync/providers/boostrail.ts:153 - Check: skipCreates price sync must still surface new price-list IDs. Why: Unseen IDs return undefined via context.authored with no sourceID/missingModelID and trackMissingModels: false, so new models.json entries are silently invisible with no notice or issue. Action: Add sourceID + skippedNotice (like meta/github-copilot) or enable missing-model tracking for hand-authoring.

@leegao6072-watershed

Copy link
Copy Markdown
Author

Thanks for the review. I re-tested every flagged model on 2026-10-19 with 3 trials per setting (142 live requests) and updated the files; each model header now records the completion-token ranges.

  • claude-opus-5: effort low to max. On a harder prompt, low gave 155–192 completion tokens and max 305–346.
  • claude-sonnet-5: still []. reasoning_effort from none to max, thinking with budget_tokens: 2048 and thinking disabled all gave 32–83 tokens with no pattern; on the harder prompt low gave 246–308 and max 209–633.
  • claude-haiku-4.5: the earlier reasoning = false was wrong. thinking.budget_tokens works (362–376 tokens, against 5–238 without it), so it now uses budget_tokens with min = 1_024 and inherits reasoning = true.
  • gpt-5.4: a PDF file part was read, so the modalities override is removed and PDF input is inherited again. Effort stays none / low / medium / high, because xhigh is accepted but served as high (high 103–108, xhigh 100–110).
  • glm-5.2 and deepseek-v4.1-flash: xhigh and max are accepted but served as high here (GLM high 256–343, max 190–317; V4.1 Flash high 70–107, max 82–94), so they are not listed. none turns thinking off on both.
  • deepseek-v4-pro: effort none / low / high / max. none and thinking.type = disabled both turn thinking off; on the harder prompt low gave 280–601 and max 374–1468. No separate toggle, since none covers off.
  • Claude PDF input: a PDF file part did not reach any of the three Claude models (22–48 prompt tokens), so they keep ["text", "image"].
  • Sync cache_write: the price list now publishes cache_write (https://www.boostrail.com/models.json; cache writes are billed at the input price), and the sync reads it from there instead of deriving it.
  • Unlisted IDs: models in the price list without a local file are now reported in the sync notices through sourceID and skippedNotice.

bun validate passes, and bun models:sync boostrail --dry-run against the live list reports 9 unchanged.

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/boostrail/models/claude-sonnet-5.toml:12 - Check: Relay reasoning_options must copy lab + same-surface peer controls; [] means affirmative no caller control, not uncertainty. Why: Lab providers/anthropic/models/claude-sonnet-5.toml is toggle + low/medium/high/xhigh/max and peer providers/openrouter/models/anthropic/claude-sonnet-5.toml is none/low/medium/high/xhigh/max, but this file claims [] from 3-trial token overlap (easy 32-83 no pattern, harder low 246-308 vs max 209-633 with max upper 2x low) while same-host claude-opus-5 on same reasoning_effort wire claims scaling. Action: Replace [] with lab/peer effort set or provide host docs/stronger test proving reasoning_effort/thinking have no effect for sonnet-5 on this host.
  • [high] [violation] packages/core/src/sync/providers/boostrail.ts:83 - Check: Price-only sync must preserve hand-authored fields when API is not authoritative and must not delete costs via undefined overwrite. Why: buildBoostRailModel does cost: {...authored.cost, input, output, cache_read, cache_write} where cache_read/cache_write are optional in Pricing; when models.json omits them they become undefined and stripUndefined deletes the authored price, contradicting all 9 TOMLs (cache_write = input + "billed at input price") and causing churn/deletion on next sync. Action: Preserve when missing (e.g. cache_read ?? authored.cost?.cache_read, cache_write ?? cache_write ?? input ?? authored.cost?.cache_write) or document authoritative deletion.
  • [high] [possible mistake] providers/boostrail/models/deepseek-v4.1-flash.toml:9 - Check: Baseline is lab + peer effort set, not a narrower invented set without host docs/live meaningful effect. Why: First-party providers/deepseek/models/deepseek-v4-flash.toml is toggle + low/high/max and peer providers/openrouter/models/deepseek/deepseek-v4.1-flash.toml is none/low/high/max (max distinct), but this file drops max as "served as high" from high 70-107 vs xhigh 80-100 vs max 82-94 overlapping with n=3 and low n=1. Action: Retain max (and toggle wire if thinking.type is forwarded) or provide separated hard-prompt evidence that max aliases high on this host.
  • [high] [possible mistake] providers/boostrail/models/glm-5.2.toml:8 - Check: Same baseline rule; first-party maps xhigh to max with effective high/max. Why: providers/zhipuai/models/glm-5.2.toml and providers/zai/models/glm-5.2.toml are high/max (low/medium→high, xhigh→max, default max), peers add none/xhigh, but this file is none/high claiming max 190-317 served as high vs high 256-343/low 240-324 overlapping n=3 where max low bound is below high, contradicting lab mapping; none 2-token off fails 1/3 trials (working written into answer). Action: Retain max (e.g. none/high/max if none disables on this wire) or provide stronger max==high proof and reliable none off evidence.
  • [medium] [possible mistake] providers/boostrail/models/deepseek-v4-pro.toml:9 - Check: toggle vs none shape and actual levels must match host wire + lab/peers. Why: Lab providers/deepseek/models/deepseek-v4-pro.toml is toggle + low/high/max, peer providers/openrouter/models/deepseek/deepseek-v4-pro.toml is none/high/xhigh, but this file is none/low/high/max with no toggle comment despite noting thinking {type: disabled} turns thinking off, and omits xhigh despite noting xhigh accepted (133-277) with no alias proof; easy prompt shows no separation, harder low 280-601 vs max 374-1468 heavily overlaps. Action: If off is separate field use toggle + graded effort with leading wire comment; if off is reasoning_effort=none document it and justify low/max inclusion and xhigh omission with separation data.
  • [medium] [possible mistake] providers/boostrail/models/gpt-5.4.toml:8 - Check: Omitted levels beyond lab/peers need host live meaningful effect covering each omitted value. Why: Lab providers/openai/models/gpt-5.4.toml and peers are none/low/medium/high/xhigh (+max on requesty), but this file drops xhigh/max as "served as high" while comment shows only xhigh 100-110 vs high 103-108 and no max trial numbers. Action: Add max trial numbers proving alias or retain xhigh/max per lab/peers until proven.

leegao6072-watershed and others added 3 commits November 10, 2026 11:43
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…; sync reads cache_write

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Rebased on dev; all model files use schema 2.
- Reasoning controls copy the lab entries (BoostRail forwards
  reasoning_effort and thinking unchanged): Sonnet 5 low..max,
  DeepSeek none|low|high|max, GLM-5.2 none|high|max, GPT-5.4 none..xhigh.
- Sync keeps authored cache prices when the price list omits them; tests.
- Drop minimax-m2.7 (no longer listed); add opencodeai to provider.toml.
@leegao6072-watershed

Copy link
Copy Markdown
Author

Rebased on dev and moved every file to schema = 2. On the six review items:

  • Claude Sonnet 5, DeepSeek V4.1 Flash, GLM-5.2, GPT-5.4: BoostRail forwards reasoning_effort and thinking unchanged, so I now copy the lab levels instead of narrowing them from short-prompt token counts. Sonnet 5 matches Opus 5 here (low..max), V4.1 Flash keeps max, GLM-5.2 is none|high|max, GPT-5.4 is none..xhigh.
  • DeepSeek V4 Pro: reasoning_effort = none turns thinking off on this API, so it is one effort list, none|low|high|max, with no toggle; low|high|max are DeepSeek's own levels and xhigh is not one of them. The header says so.
  • Sync: missing cache prices in the list now keep the authored values, with a test.

Also: minimax-m2.7 is removed because BoostRail no longer lists it, provider.toml has opencodeai, and gpt-5.4 has no freeform (a regex-grammar custom tool was not enforced on this API; evidence in the file header).

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/boostrail/models/claude-haiku-4.5.toml:16 - Check: Override-only provider files after base_model must keep only provider-specific fields and real deltas. Why: output = ["text"] is identical to models/anthropic/claude-haiku-4-5.toml:11 and restates inherited data while the real delta is only dropping application/pdf from input. Action: Remove the output line and keep only the narrowed input list.
  • [high] [violation] providers/boostrail/models/claude-opus-5.toml:15 - Check: Override-only provider files after base_model must keep only provider-specific fields and real deltas. Why: output = ["text"] is identical to models/anthropic/claude-opus-5.toml:11 and restates inherited data while the real delta is only dropping application/pdf from input. Action: Remove the output line and keep only the narrowed input list.
  • [high] [violation] providers/boostrail/models/claude-sonnet-5.toml:15 - Check: Override-only provider files after base_model must keep only provider-specific fields and real deltas. Why: output = ["text"] is identical to models/anthropic/claude-sonnet-5.toml:11 and restates inherited data while the real delta is only dropping application/pdf from input. Action: Remove the output line and keep only the narrowed input list.
  • [high] [violation] providers/boostrail/models/kimi-k2.7-code.toml:13 - Check: Override-only provider files after base_model must keep only provider-specific fields and real deltas. Why: output = ["text"] is identical to models/moonshotai/kimi-k2.7-code.toml:38 and restates inherited data while the real delta is only dropping the video/* entries from input. Action: Remove the output line and keep only the narrowed input list.

@leegao6072-watershed

Copy link
Copy Markdown
Author

On the four output = ["text"] items: I tried removing the line, but once a file has a [modalities] table, modalities.output is required, and bun validate fails with modalities.output: Required on all four files. So the line stays, as in providers/llmgateway/models/claude-sonnet-5.toml and providers/openrouter/models/moonshotai/kimi-k2.7-code.toml, which narrow input the same way. The real delta in each file is still only the narrowed input list.

@leegao6072-watershed

Copy link
Copy Markdown
Author

Merged the latest dev to resolve the conflict in packages/core/src/sync/index.ts (both sides added a line to the aggregators list; both kept). Also dropped two casts in boostrail.test.ts that no longer type-check against the current SyncedModel.

Checked locally: bun validate passes; bun run test shows the same 3 failures as dev itself, BoostRail tests pass; a dry-run sync against our live catalog reports 8 unchanged.

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/boostrail/models/claude-haiku-4.5.toml:19 (also claude-opus-5.toml:18, claude-sonnet-5.toml:18) - Check: Relay reasoning controls must copy the lab entry's control set, including the toggle when the host forwards the on/off field (AGENTS.md → Reasoning controls; audit-reasoning-options SKILL.md Step 2 "Toggle if native/peers have a real on/off and this host forwards it", Step 3 "separate on/off + graded effort → toggle = true + effort"). Why: The first-party entries providers/anthropic/models/claude-{sonnet-5,opus-5,haiku-4-5}.toml all author toggle = true with wire path thinking.type = adaptive|disabled (haiku: enabled|disabled), and this PR's own file headers and body state BoostRail "forwards reasoning_effort and thinking unchanged to the route serving the model", so the off control exists on this host's surface. The haiku header's live result (a thinking {type: enabled, budget_tokens: 2048} request measurably changed output) proves the thinking field is honored here, yet the toggle was dropped from all three files — so the catalog publishes no way to turn thinking off on this host, and the headers' "controls below follow the lab entry" rationale is not what the files do. none is not a substitute: your own live tests showed reasoning_effort = none does not disable thinking on the Claude route. Action: Add toggle = true to the three Claude entries plus the required leading # Toggle: thinking.type = adaptive|disabled (haiku: enabled|disabled) wire comment, or provide affirmative evidence that thinking.type is not honored on this host's Claude route — which would also contradict the haiku budget result and require correcting the "forwards thinking unchanged" claim in the headers and PR body.
  • [medium] [violation] providers/boostrail/models/claude-sonnet-5.toml:17 (all 8 model files) - Check: capabilities.cache must be authored when the host caches: "a kind that isn't listed isn't supported", and a host that caches without documenting the mechanism gets cache = { implicit = true } (AGENTS.md → Provider model file). Why: Every BoostRail file bills cache reads and writes ([cost.text.input] cache = { read = …, write = … }), which only exists because the host prompt-caches, but no file declares any cache capability — so each resolved model publishes "no caching" next to cache prices in the same file. Peer relays with cache pricing author it (e.g. every providers/novita-ai/models/** file sets cache = { implicit = true }), and the repo's own syncs treat a listed cache price as implying implicit caching (togetherai, empiriolabs, crossmodel notes in sync.md). Action: Add cache = { implicit = true } to each model's [capabilities] (or the documented kind/TTL details if BoostRail documents its caching mechanism), keeping it out of any API table where it does not hold.

This branch was previously deployed

1 inactive deployment
release — a5405998 Deployed Nov 25, 2026 by leegao6072-watershed via review #20929
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant