feat(layerx1): add LayerX1 provider with 32 models - #5063
Conversation
LayerX1 is an OpenAI-compatible multi-model gateway that also serves the Anthropic Messages and OpenAI Responses wires on the same key. Every model uses base_model against the existing lab entry and carries only provider-authored fields (cost) plus real deltas, so no lab metadata is restated. Pricing is taken from the live catalog at api.layerx1.com/v1/models. reasoning_options is uniform across models because the gateway normalizes every backend onto one neutral effort ladder (none/minimal/low/medium/high/max) and exposes visibility separately via include_reasoning, so effort support does not vary per backend. It intentionally omits xhigh, which is not implemented.
Action items
|
…alities - Drop `toggle`: LayerX1 has no separate boolean enable. Reasoning is one `reasoning` effort parameter whose "none" value is the off switch, so a toggle would duplicate `effort = none`. Keeps one wire model consistently. - Drop `budget_tokens`: /v1/models advertises no reasoning-budget parameter, so declaring it would tell clients an integer budget is first-class when it is not. - Make `attachment` and `modalities.input` agree with the capability flags. `attachment` is now true when the lane accepts any file, so it can no longer contradict a vision-capable model; "image"/"video" gate on `vision` and "pdf" gates on `documents`. This fixes lx1-opus-5 and lx1-sonnet-5, which claimed attachment = false while still inheriting pdf input. - Cite the evidence inline on the two `reasoning = false` overrides: /v1/models omits `reasoning` from both `capabilities` and `supported_parameters` for lx1-kimi-k2.5 and lx1-qwen-turbo.
|
Thanks — the reasoning-options criticism was correct on all counts. Fixed in cff2408. 1 & 2, 3, 4 & 5, 6, incomplete text-only overrides (medium). Real bug, thank you. Rather than patch Net effect: |
Action items
|
Adds LayerX1 (layerx1.com · docs) as a provider.
LayerX1 is an OpenAI-compatible multi-model gateway. The same key also serves the
Anthropic Messages and OpenAI Responses wires, so
@ai-sdk/openai-compatible+apiis the right entry.Contents
provider.toml—LAYERX1_API_KEY,api = https://api.layerx1.com/v1logo.svg—currentColoronly, no hardcoded colors, no fixedwidth/height, squareviewBoxmodels/How the model files were authored
LayerX1 hosts models it did not create, so every file uses
base_modelagainstthe existing lab entry and is override-only. No lab metadata (
name,description, dates,open_weights, matchinglimit/modalities) is restated.Provider-authored fields are
costandreasoning_options. Beyond those, the onlyvalues present are genuine deltas where LayerX1's published capability differs from
the lab entry — a smaller served context, or a text-only lane for a model that is
multimodal upstream.
Costs come from the live catalog at
https://api.layerx1.com/v1/models(
pricing_usd_per_mtok), withcached_inputmapped tocache_read.reasoning_optionsThese are uniform across the reasoning models, which is intentional rather than
copy-paste. The gateway normalizes every backend onto a single neutral effort
ladder —
none | minimal | low | medium | high | max— and exposes reasoningvisibility separately through
include_reasoning, independent of effort.Anthropic-style token budgets are accepted and translated onto the same control.
So the surface a caller sees does not vary per backend:
xhighis deliberately absent — the schema permits it but LayerX1 does notimplement it, and the ladder is a documented API surface rather than an inference.
Deliberately not included
embeddinggemma-300m,qwen3-embed-0.6b,plamo-embed-1b). These need lab entries that don't exist yet — there is nomodels/baai/at all. Happy to open a follow-up PR authoring complete labmetadata for those rather than bundle it here.
Left out rather than guessed at a
base_model.Validation
bun validatepasses, andlayerx1resolves with all 32 models.Offer
LayerX1's
/v1/modelsis a rich catalog endpoint — it returns pricing, contextwindow, capabilities, and per-model reasoning support, and it is authoritative
about removals. That fits the sync-module criteria in
sync.md, so if you'dprefer this entry be sync-maintained rather than hand-authored, I'm glad to add
the module in a follow-up.