504 Commits

Author SHA1 Message Date
opencode-agent[bot] f804dab66a docs(sdk): deprecate context_over_200k (#5335)
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2026-08-23 11:48:13 -05:00
opencode-agent[bot] d8e4cf27ce chore(sync): auto-merge LLM Gateway provider updates (#5208)
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2026-08-21 09:25:18 -05:00
Ismail Ghallou 82345e0bf3 feat: split LLM Gateway into two provider catalogs (#4011)
* feat: split LLM Gateway into two provider catalogs

Renames the existing llmgateway provider to "DevPass (LLM Gateway)" (id
and models unchanged: the aggregated, auto-routed root-model catalog) and
adds llmgateway-providers ("LLM Gateway"): one entry per upstream
provider mapping, addressed as provider/model-id, synced from
/v1/models?mapped=true. The catalog starts empty and is populated by the
scheduled sync automation; the sync refuses to run against a deployment
without the mapped view so it fails loudly instead of syncing wrong ids.

Claude-Session: https://claude.ai/code/session_017pReWhniXJcDL9aiQHqoFQ

* fix: apply deployment data on mapped factored entries

Addresses the PR review: brand-new factored mapped entries now carry the
mapping's own capability flags (attachment/tool_call/reasoning and
structured_output) as overrides, translate the deployment's declared
reasoning_efforts into reasoning_options instead of stamping [], prefer
the gateway's served max_output over inherited/authored output limits,
and only fall back to context when the base metadata declares no output.
Adds unit tests for mapped factoring, capability overrides, max_output
preference, and the unprefixed-id refusal guard.

Claude-Session: https://claude.ai/code/session_017pReWhniXJcDL9aiQHqoFQ

* chore: seed the llmgateway-providers catalog

The dev branch now rejects providers with zero models, so the empty
.gitkeep-anchored catalog no longer validates. Seed it with a small
representative set generated by the sync (factored, full, duplicate
deployments of one model, capability deltas); the scheduled sync fills
in the rest once the gateway's mapped view is live.

Claude-Session: https://claude.ai/code/session_017pReWhniXJcDL9aiQHqoFQ

* fix: honor base and sibling reasoning data on mapped sync

Round 2 of review feedback:
- Factored resyncs no longer stamp context as limit.output when the
  gateway omits max_output and the base declares an output to inherit;
  the served max_output still wins whenever reported (creates and
  resyncs), and reasoning_options now refresh from deployment efforts.
- A deployment whose only accepted effort is "none" is a plain on/off
  switch, so it translates to a toggle (matches the lab's control).
- When a deployment declares no efforts, mapped entries reuse the
  aggregated llmgateway catalog's curated reasoning_options for the
  same root model instead of ending up with []; a curated [] counts as
  unknown so a bad first stamp is not sticky. The runner also stops
  stamping [] onto factored reasoners whose base metadata already
  declares reasoning_options (it would shadow the base's controls).
- perplexity added to the canonical prefixes so Sonar models factor
  against their lab metadata; the sonar-pro seed is now override-only.

Claude-Session: https://claude.ai/code/session_017pReWhniXJcDL9aiQHqoFQ

* fix: harden mapped sync guards and seed curation

Round 3 of review feedback:
- Both LLM Gateway syncs now reject an empty (or fully filtered)
  response instead of authoritatively deleting the catalog through the
  delete-missing pass; the every() prefix guard alone passed on [].
- A vision-less deployment also overrides modalities on factored
  creates, so attachment=false can no longer coexist with inherited
  image input (sonar-pro seed regenerated accordingly).
- Mapped entries copy the interleaved reasoning side-channel from the
  aggregated llmgateway catalog when the deployment reasons (same wire
  surface); glm-5.1 and kimi-k2.6 seeds now carry it.
- Toggle seeds carry the required leading wire-path comment.
- gpt-5.5 seeds author the 272k context pricing tier so resync
  preserves it, matching the first-party and aggregated entries.

Claude-Session: https://claude.ai/code/session_017pReWhniXJcDL9aiQHqoFQ

* fix: never author zero limits, enforce vision on modalities

Round 4 of review feedback:
- A missing/zero context_length is no longer written as limit.context=0:
  factored entries leave context unset and inherit the base, and
  unfactored creates without a positive served context are skipped
  (reported via sourceID) instead of publishing unusable limits. Applies
  to both the aggregated and mapped builders.
- vision=false now forces non-image input modalities from the mapping
  itself instead of trusting the model-level architecture, on both the
  factored and unfactored create paths (and the existing-full fallback).

Claude-Session: https://claude.ai/code/session_017pReWhniXJcDL9aiQHqoFQ

* fix: scalable logo, require one mapping per entry

Review round 5: drop the fixed width/height from the new provider logo
(AGENTS.md blocker), and fail the mapped sync loudly when a kept model
does not carry exactly one providers[] mapping instead of letting the
builder silently fall back to noisy supported_parameters defaults.

Claude-Session: https://claude.ai/code/session_0131ZfUnTfJrCzygw3wE4bNF

* fix: inherit lab descriptions, author toggle headers

Review round 6: mapped factored resyncs no longer stamp a synthesized
describeModel blurb as a sticky description override (unset keeps
inheriting the lab text, matching merge-gateway/cortecs), and mapped
sync writes now author the required leading wire-path comment on files
that carry a toggle reasoning control via a new optional header on the
translateModel result (an existing on-disk header always wins).

Claude-Session: https://claude.ai/code/session_0131ZfUnTfJrCzygw3wE4bNF

* fix: keep mapping flags authoritative on resyncs

Review round 7: mapped existing-entry resyncs (factored and full) now
apply the deployment mapping's reasoning/vision/tools/structured-output
flags with the same authority as creates, so the written booleans and
the reasoning_options derived from them always move together and drift
self-heals hourly; prior curation only fills in where the mapping is
silent. Also documents in the together-ai/kimi-k2.6 seed header why
that pin is intentionally weaker than Together's first-party row (the
gateway serves it with tools/JSON off and a 32k output cap per its own
e2e'd catalog mapping).

Claude-Session: https://claude.ai/code/session_0131ZfUnTfJrCzygw3wE4bNF

* fix: realign vision modalities in both directions

Review round 8: mapped resyncs no longer keep a stale text-only
modalities override once the deployment's vision returns — a declared
vision=true clears the override on factored entries (base image/pdf
inputs inherit again) and recomputes from the served architecture on
full entries, mirroring how vision=false already strips them; only a
silent mapping leaves curated modalities untouched.

Claude-Session: https://claude.ai/code/session_0131ZfUnTfJrCzygw3wE4bNF

* fix: local perplexity resolution, no zero limits

Review round 9: drop the perplexity entry from the shared
CANONICAL_PROVIDER_PREFIXES (it would silently start factoring other
hosts' standalone perplexity files) — the llmgateway sync now resolves
lab IDs through resolveModelMetadataBaseModel, whose exact models/ path
match covers perplexity without touching other providers. Full-row
resyncs in both builders no longer fall back to the zero/absent
reported context: authored limits only ever carry known-positive
values, an authored 0 on disk counts as unusable, and a full row with
no usable context anywhere fails loudly (skipping would hand the file
to the delete-missing pass).

Claude-Session: https://claude.ai/code/session_0131ZfUnTfJrCzygw3wE4bNF

* fix: merge deployment efforts with curated controls

Review round 10: deployment reasoning_efforts now own only the
effort/toggle surface — curated non-effort controls such as
budget_tokens (the same host's $.reasoning.max_tokens path, mirroring
DigitalOcean's sync) survive from the existing file or the aggregated
sibling instead of being wiped on every resync. Mapped creates also
seed cost.tiers from the aggregated sibling's curated tiers, since the
gateway API exposes none and the bulk sync would otherwise author
tiered models at flat long-context rates; authored tiers still win on
resync.

Claude-Session: https://claude.ai/code/session_0131ZfUnTfJrCzygw3wE4bNF
2026-08-20 13:39:11 -05:00
Frank cc26636044 update zen models 2026-08-20 00:53:13 -04:00
opencode-agent[bot] 960ee7785d fix(sync): normalize Cortecs file modalities (#5089)
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2026-08-19 15:36:24 -05:00
opencode-agent[bot] 734d20ea43 chore(sync): allow CrossModel reasoning auto-merge (#5078)
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2026-08-19 12:52:44 -05:00
opencode-agent[bot] 98de72cc24 fix(vercel): factor free routes onto base models (#5077)
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2026-08-19 12:46:58 -05:00
opencode-agent[bot] 3bb30a8d2b fix(baseten): preserve authored output limits (#4948)
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
2026-08-18 00:07:07 -05:00
choccho af4bc2ee9e Add Sakana Namazu model (#4608)
* Add Sakana Namazu model

* Update Sakana AI lab description

* Restore Sakana AI lab description

* Delete provider section in sakana-namazu.toml

Removed provider section from sakana-namazu.toml

---------

Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
2026-08-17 20:16:48 -05:00
opencode-agent[bot] 804894e1db fix(sync): inherit Vercel fast model reasoning options (#4925)
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
2026-08-17 16:56:42 -05:00
opencode-agent[bot] 17da18dd97 fix(sync): accept OpenRouter time-window pricing overrides (#4850)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
2026-08-16 16:59:50 -05:00
opencode-agent[bot] 5e089c5cb6 chore(sync): allow Eden AI reasoning auto-merge (#4849)
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
2026-08-16 15:53:05 -05:00
opencode-agent[bot] 4f3a3664fa fix(sync): trust Charm Hyper reasoning metadata (#4840)
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
2026-08-16 15:24:57 -05:00
Adam Dalloul 8e804a4ee8 feat(sync): auto-resolve EmpirioLabs models from canonical metadata (#4757)
* feat(sync): auto-resolve EmpirioLabs models from canonical metadata

The EmpirioLabs adapter only tried a few family prefixes, so models
with existing lab TOMLs were skipped. Resolve via family prefixes,
version-dot slugs, unique filenames, and dated/version suffixes.
Treat EmpirioLabs as a reviewed reasoning provider so hourly syncs
can auto-merge factored catalog updates.

* fix(sync): use mistralai prefix for EmpirioLabs Mistral ids

* test(sync): stop asserting qwen3-8-27b has no canonical
2026-08-15 22:13:23 -05:00
opencode-agent[bot] b7367fabdc fix(sync): allow Venice reasoning auto-merge (#4668)
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
2026-08-13 21:42:10 -05:00
opencode-agent[bot] 5a627a355c feat(sync): trust LLM Gateway reasoning metadata (#4646)
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
2026-08-13 14:47:10 -05:00
opencode-agent[bot] 9499c8320a fix(sync): import LLM Gateway reasoning efforts (#4595)
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
2026-08-12 18:17:17 -05:00
opencode-agent[bot] df5b90789f chore(sync): update LLM Gateway model catalog (#4582)
* chore(sync): update LLM Gateway model catalog

* fix(llmgateway): correct Grok 4.6 reasoning options

* fix(llmgateway): factor Grok 4.6 metadata

---------

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
2026-08-12 15:27:38 -05:00
opencode-agent[bot] 8221d31a14 feat(sync): trust reasoning metadata from more providers (#4588)
Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
2026-08-12 15:14:49 -05:00
Aiden Cline ede9d97db8 fix(sync): accept nullable CrossModel reasoning controls (#4587) 2026-08-12 15:06:57 -05:00
Mounir Charef 0b921aaf88 feat(provider): add Eden AI (#4506) 2026-08-12 10:44:57 -05:00
Matthew Feroz 66c6a1dc69 feat(merge-gateway): expose OpenAI-compatible API endpoint (#4547) 2026-08-12 10:44:39 -05:00
Oskar Gustafsson 3a30e92fe0 feat(sync): add Inceptron model catalog sync (#4548)
* Add Inceptron provider sync module

* Require review for Inceptron reasoning sync changes

Inceptron's models_dev reasoning metadata is provider-authored and is not independently constrained to reviewed lab or peer baselines. Keep it outside the reasoning auto-merge allowlist and assert that changes to its reasoning metadata require manual review.
2026-08-12 10:42:43 -05:00
Aiden Cline d702f48315 fix(sync): preserve OpenRouter reasoning toggles (#4521) 2026-08-11 13:44:26 -05:00
Aiden Cline 69aa0c788d feat(bytedance-seed): add Seed 2.0 Code metadata (#4516)
* feat(bytedance-seed): add Seed 2.0 Code metadata

* fix(sync): resolve Seed 2.0 Code aliases
2026-08-11 13:30:12 -05:00
Kibouo 0ee9990e13 Add Sonnet 5 to Azure Cognitive Services (#4493)
* Add Sonnet 5 to Azure Cognitive Services

* fix azure claude model catalogs

* fix azure claude review findings

---------

Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2026-08-11 10:42:41 -05:00
Aiden Cline a35c2f70e4 fix: map Muse Glimmer hosts onto the Meta lab model (#4480)
* feat(models): add Meta Muse Glimmer 30B lab metadata

Add the lab model so OpenRouter, Vercel, Kilo, and other hosts can
base_model onto meta/muse-glimmer-30b instead of shipping standalone
copies.

* fix: map Muse Glimmer hosts onto the Meta lab model

Factor OpenRouter and Vercel onto base_model = meta/muse-glimmer-30b
and keep only host cost plus the documented low/medium/high/xhigh
reasoning_effort controls.
2026-08-10 23:11:40 -05:00
Aiden Cline 289a4c2e31 fix(merge-gateway): tolerate null reasoning metadata (#4408)
The Gateway catalog emits capabilities.reasoning = null on some routes
even when supports_reasoning is true. Treat null like a missing object
so sync does not crash while deriving reasoning_options.
2026-08-09 11:22:29 -05:00
opencode-agent[bot] a6393f44a2 chore(sync): update Cortecs model catalog (#4353)
* chore(sync): update Cortecs model catalog

* fix(sync): preserve Cortecs reasoning overrides

---------

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2026-08-08 20:45:23 -05:00
Aiden Cline 11304b3bba fix(sync): track missing Pioneer and Ofox models (#4125) 2026-08-06 13:15:34 -05:00
Samrath 43ff4ad9b5 feat(pioneer): add 26 models (Kimi K3, Claude Opus 5, GPT-5.6) (#3814)
* fix(pioneer): filter API alias dupes, derive cost, honor base-model reasoning

Pioneer /v1/models returns each served model twice: once under its real
id and once under a duplicate "anthropic/pioneer/<id>" alias. Drop the
aliases so the sync no longer authors phantom "anthropic/pioneer/*" TOMLs.

Also derive cost from the API's per-1M-token prices for newly created
models (previously cost was only preserved from an existing file), and
trust the base model's authored reasoning flag instead of Pioneer's
boilerplate reasoning levels, which are identical for every model and
were wrongly marking non-reasoning models (e.g. Pixtral) as reasoning.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat(pioneer): add frontier and open models via base_model inheritance

Add 26 Pioneer models, each inheriting provider-agnostic facts through
base_model rather than duplicating them inline.

New model metadata entries:
- anthropic/claude-opus-5 (released 2026-07-24)
- alibaba/qwen2.5-coder-0.5b, alibaba/qwen3-235b-a22b-instruct-2507
- deepseek/deepseek-v3, deepseek/deepseek-v3.1
- meta/llama-3.2-1b, meta/llama-3.2-3b
- mistral/codestral-22b-v0.1, mistral/magistral-small-2506,
  mistral/ministral-8b-instruct-2410

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(qwen): set tool_call=false for Qwen2.5-Coder-0.5B base model

The served id and weights are the base (pretrained) checkpoint, not the
Instruct variant. The Qwen model card states base models are not
recommended for conversation and documents no tool/function calling, so
tool_call=true was inaccurate. Matches the Llama base entries in this PR.

---------

Co-authored-by: Samrath <samrath@Samraths-MacBook-Pro-6.local>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-05 15:19:10 -05:00
Asmae_ELAZRAK f6627a980c feat(sync): add Cortecs model sync (#3903)
* feat(sync): add Cortecs model sync

* fix: review bot comments

* fix: model update

* fix: output field

* fix: model update

* test(sync): preserve Cortecs reasoning options

---------

Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2026-08-05 10:06:53 -05:00
Abel Debalkew 582eaaa208 fix(sync): emit toggle + effort from reasoning.effort_values (#4060)
The merge-gateway sync synthesized a bare reasoning toggle from
disable_supported and ignored reasoning.controls, so claude-opus-5 (newly
added, no curated reasoning_options) got a bare [[reasoning_options]] toggle
even though the route advertises a graded reasoning.effort control. The rest
of the Claude family carried toggle + effort because their options were
hand-authored; any future new model would regress the same way.

Map reasoning.controls into synthesized options: toggle when disable is
supported, plus effort when the route advertises effort and the API provides
effort_values. Author claude-opus-5's TOML to toggle + effort [low..max],
matching the family.
2026-08-04 20:25:07 -05:00
Aiden Cline 29db3a439a fix(sync): allow safe reasoning model updates (#4048)
* fix(sync): allow safe reasoning model updates

* fix(sync): keep deleted models uninspected
2026-08-04 09:03:31 -05:00
JC f658a67277 fix(sync): map CrossModel structured output (#4038)
Co-authored-by: hujuncheng <hujuncheng@baidu.com>
2026-08-04 08:42:32 -05:00
John Costa 465d15fb33 feat(requesty): syncing script and all models added (#3856)
* feat(requesty): provider sync script to get models from /v1/models/managed

Requesty has "managed" models, which are provider agnostic.

* feat(requesty): syncing all models from requesty
2026-08-04 08:22:23 -05:00
Aiden Cline 42707bc9ed validate providers have models (#4014) 2026-08-03 14:46:30 -05:00
Aiden Cline e45188c568 feat(sync): auto-merge safe catalog updates (#3958)
* feat(sync): auto-merge safe catalog updates

* fix(sync): count model additions and deletions directly

* fix(sync): require review for reasoning changes

* fix(sync): disable unsafe auto-merge before push

* fix(sync): harden auto-merge check output
2026-08-03 14:34:12 -05:00
Michael Gasperini d4f68b474e fix(chutes): declare reasoning toggles instead of empty options (#4005)
* fix(chutes): declare reasoning toggles instead of empty options

Every Chutes model with `reasoning = true` carried
`reasoning_options = []`, which asserts that the host exposes no
caller-facing reasoning control. That is not the case: Chutes serves
these models on vLLM and forwards `chat_template_kwargs`, so the
underlying chat templates' thinking switches are reachable over the
wire.

Ten models are switched to `[{ type = "toggle" }]`; each one is
verified twice, against the model's published chat template and
against a live request to this host. `Qwen3-235B-A22B-Thinking-2507-TEE`
keeps `[]`: its chat template exposes no thinking switch and the live
request confirms reasoning cannot be turned off.

* fix(chutes): keep authored reasoning options across sync

The toggles added in the previous commit were not durable. `buildChutesModel`
always emitted `reasoning_options: []`, and `preserveReasoningOptions` returns
early whenever the synced model defines the field at all, so the branch that
restores authored options was unreachable for this provider. The next
`bun chutes:sync` would have reset all ten models to an empty list.

Leaving the field unset in the sync restores the intended behaviour: authored
options are preserved, and reasoners with no entry yet still default to `[]`.
Verified by running `bun chutes:sync` against the live endpoint with the
toggles in place — 13 unchanged, all ten toggles intact.

The provider header and sync notes both still claimed Chutes exposes no
caller-facing reasoning control, which contradicted the model files. Both now
document the verified `chat_template_kwargs` paths and record that the control
is authored per model rather than derived from `/v1/models`.
2026-08-03 14:26:14 -05:00
Aiden Cline 3649ad841a fix(sync): inherit Hyper reasoning from base models (#4004) 2026-08-03 11:58:21 -05:00
celeste 504dabb073 feat(ofox): add catalog sync module (#3978)
Sync existing Ofox TOMLs from the public catalog API
(https://api.ofox.ai/v1/models/catalog). Conservative scope:

- skipCreates + trackMissingModels=false: the Ofox listing here is a
  curated subset, so new models keep entering via hand-authored PRs
- deleteMissing=false with a notice: delisted models get flagged for
  manual deprecation review instead of silent removal
- catalog is treated as authoritative for cost and deprecation status
  only; base_model inheritance, reasoning_options, and per-model
  [provider] protocol overrides are preserved as authored

Co-authored-by: celeste1900 <caojingmiao@meiqia.com>
2026-08-03 10:44:51 -05:00
Jack 403a7bdd43 add qwen3.8-Max to Go 2026-08-03 14:49:06 +08:00
Aiden Cline beaccbb2d5 fix(sync): harden NanoGPT reasoning metadata (#3974) 2026-08-02 22:48:07 -05:00
Aiden Cline e2761846cb fix(sync): dedupe Kilo reasoning efforts (#3972) 2026-08-02 22:33:36 -05:00
Aiden Cline e1bdd2adce fix(sync): prefer Kilo reasoning metadata (#3971) 2026-08-02 22:18:29 -05:00
Aiden Cline 83a78948af fix(sync): harden DigitalOcean catalog translation (#3904)
* fix(sync): harden DigitalOcean catalog translation

Stop incomplete DO catalog rows from corrupting curated model data:
- map mimo-* IDs to xiaomi base metadata
- only treat thinking=true as authoritative reasoning (not bare efforts)
- merge effort lists so incomplete remote values cannot drop none/xhigh
- normalize x-high → xhigh
- union modalities with authored data; skip text-only overrides on base models
- keep beta status for Public Preview names

* fix(sync): preserve DigitalOcean modality overrides

* fix(sync): prefer DigitalOcean catalog metadata

* fix(sync): fall back on empty reasoning efforts

* fix(sync): respect DigitalOcean modality removals
2026-08-02 21:58:47 -05:00
Aiden Cline 8851d6411c fix: factor DeepSeek V4 Flash 0731 providers (#3957)
* fix: factor DeepSeek V4 Flash 0731 providers

* fix: update DeepSeek Flash API base model

* fix: update OpenCode DeepSeek Flash base models
2026-08-02 11:03:50 -05:00
Adam Dalloul f909001a8c feat: map DeepSeek V4 Flash 0731 for EmpirioLabs (#3942)
* feat: map DeepSeek V4 Flash 0731 for EmpirioLabs

* style: preserve LF in EmpirioLabs sync map
2026-08-01 17:26:27 -05:00
Kushida 303081b3a5 fix(core): reject unknown nested model fields (#3920)
* fix(core): reject unknown nested model fields

* test(core): isolate nested field regression

* fix(core): preserve image generation pricing

* test(core): cover nested provider configuration

* style(core): preserve cost schema layout

* fix(core): preserve image and cache pricing

* fix(core): preserve request and citation pricing

* fix(core): reject unsupported cost fields

* style(data): preserve TOML formatting
2026-08-01 10:43:28 -05:00
Aiden Cline 499df6cc34 fix(sync): map long-context pricing tiers from xAI and OpenRouter APIs (#3913)
* fix(sync): map long-context pricing tiers from xAI and OpenRouter APIs

Both APIs already expose long-context rates, but sync preserved hand-authored
[[cost.tiers]] and never self-healed stale values (e.g. grok-4.5 cache_read).

- xAI: read *_long_context prices + long_context_threshold
- OpenRouter: map pricing.overrides → cost.tiers

* refactor(sync): simplify long-context tier mapping

Drop longContextPrice helper and conditional spreads; use || for xAI
zero-means-base and flatMap for OpenRouter overrides.

* fix(sync): treat omitted xAI long-context rates as unknown

0 means same-as-base; undefined means the field was omitted — only the
latter should keep hand-authored tiers instead of fabricating base prices.
2026-07-31 15:34:20 -05:00