mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-29 01:42:21 +00:00
Introduces AdapterKind::OpenRouter and a new providers/openrouter.rs
adapter that sits on top of the shared openai_chat module via ChatHooks:
- mutate_request: translates the typed Request.reasoning_effort field
into OpenRouter's {reasoning: {effort: ...}} JSON shape, unless the
caller has already set a reasoning value explicitly via
provider_options.openrouter.
- enrich_response: pulls OpenRouter's inline usage.cost into
Response.cost_usd with CostSource::Authoritative, overriding any
catalog-estimated value.
The catalog's adapter_defaults table now recognizes OpenRouter (it
shares the OpenAI billing policy and agent profile at the wire level)
and the existing builtin_openrouter_provider_is_opt_in test is updated
to assert AdapterKind::OpenRouter. A new family-allowlist test asserts
the per-vendor family rename that lands in the next commit.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| crates | ||
| packages/fabro-api-client | ||