Skip to content

feat(layerx1): add LayerX1 provider with 32 models - #5063

Open
ATOM00blue wants to merge 2 commits into
anomalyco:devfrom
ATOM00blue:add-layerx1-provider
Open

feat(layerx1): add LayerX1 provider with 32 models#5063
ATOM00blue wants to merge 2 commits into
anomalyco:devfrom
ATOM00blue:add-layerx1-provider

Conversation

@ATOM00blue

Copy link
Copy Markdown

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 +
api is the right entry.

Contents

  • provider.tomlLAYERX1_API_KEY, api = https://api.layerx1.com/v1
  • logo.svgcurrentColor only, no hardcoded colors, no fixed width/height, square viewBox
  • 32 model TOMLs under models/

How the model files were authored

LayerX1 hosts models it did not create, so every file uses base_model against
the existing lab entry and is override-only. No lab metadata (name,
description, dates, open_weights, matching limit/modalities) is restated.

Provider-authored fields are cost and reasoning_options. Beyond those, the only
values 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), with cached_input mapped to cache_read.

reasoning_options

These 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 reasoning
visibility 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:

reasoning_options = [
  { type = "toggle" },
  { type = "effort", values = ["none", "minimal", "low", "medium", "high", "max"] },
  { type = "budget_tokens" },
]

xhigh is deliberately absent — the schema permits it but LayerX1 does not
implement it, and the ladder is a documented API surface rather than an inference.

Deliberately not included

  • 7 embedding models (BGE family, embeddinggemma-300m, qwen3-embed-0.6b,
    plamo-embed-1b). These need lab entries that don't exist yet — there is no
    models/baai/ at all. Happy to open a follow-up PR authoring complete lab
    metadata for those rather than bundle it here.
  • 2 models whose upstream identity I could not establish with confidence.
    Left out rather than guessed at a base_model.

Validation

bun validate passes, and layerx1 resolves with all 32 models.

Offer

LayerX1's /v1/models is a rich catalog endpoint — it returns pricing, context
window, capabilities, and per-model reasoning support, and it is authoritative
about removals. That fits the sync-module criteria in sync.md, so if you'd
prefer this entry be sync-maintained rather than hand-authored, I'm glad to add
the module in a follow-up.

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.
Copilot AI lite review requested due to automatic review settings August 19, 2026 14:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/layerx1/models/lx1-deepseek-v3.2.toml:4 - Check: toggle must not be paired with effort that already includes none. Why: Every reasoning model uses { type = "toggle" } together with effort values that include "none" (e.g. deepseek, glm, gpt-oss, grok, kimi, longcat, minimax, nemotron, opus, qwen, sonnet). AGENTS.md / the reasoning-options audit treat that as invalid: off is either effort=none or a separate toggle, not both. The PR’s include_reasoning “visibility” control is not a valid reason to keep both shapes. Action: Pick one wire model and apply it consistently: either drop toggle and keep effort with none, or drop none from effort and keep toggle only if it is a true on/off control (not response visibility). Update all ~24 reasoning TOMLs the same way.
  • [high] [violation] providers/layerx1/models/lx1-deepseek-v3.2.toml:1 - Check: Every toggle needs a leading top-of-file wire comment on the model file. Why: Reasoning model files start with base_model and declare toggle with no per-file wire path. A note only in provider.toml does not satisfy the requirement (and sync-safe comments must sit above the first key in the file that owns the toggle). Action: If toggle remains, add a leading comment on each toggled model file with the exact request field (e.g. include_reasoning / effort path). If toggle is removed per the item above, this is moot.
  • [medium] [possible mistake] providers/layerx1/models/lx1-deepseek-v3.2.toml:6 - Check: budget_tokens only when this host exposes a real reasoning-token budget field. Why: The same budget_tokens entry is stamped on every reasoner, including surfaces that are effort-only upstream (DeepSeek V4, Claude 4.8+/5 adaptive effort, gpt-oss, etc.). Translating Anthropic budgets into an effort ladder is not by itself a budget control; advertising budget_tokens tells clients a integer reasoning budget is first-class. Action: Keep budget_tokens only if LayerX1’s API actually accepts a reasoning budget parameter with meaningful effect; otherwise remove it. Cite the exact wire field in a leading comment when kept.
  • [medium] [possible mistake] providers/layerx1/models/lx1-kimi-k2.5.toml:3 - Check: Provider reasoning overrides must match what this host actually serves. Why: reasoning = false contradicts lab models/moonshotai/kimi-k2.5.toml and first-party providers/moonshotai/models/kimi-k2.5.toml (reasoning = true with a toggle). Forcing non-reasoning drops required reasoning_options and mislabels a thinking model if the gateway still runs it as one. Action: Verify LayerX1’s live behavior/docs for lx1-kimi-k2.5; restore reasoning = true + correct reasoning_options, or document evidence that this lane is non-thinking only.
  • [medium] [possible mistake] providers/layerx1/models/lx1-qwen-turbo.toml:3 - Check: Provider reasoning overrides must match what this host actually serves. Why: reasoning = false contradicts lab models/alibaba/qwen-turbo.toml and first-party Alibaba (reasoning = true, toggle + budget_tokens). Action: Confirm LayerX1 disables thinking for this ID; if not, drop the override and author reasoning_options for the host surface.
  • [medium] [possible mistake] providers/layerx1/models/lx1-opus-5.toml:3 - Check: Text-only / no-attachment overrides should be complete and consistent. Why: lx1-opus-5 and lx1-sonnet-5 set attachment = false but still inherit lab [modalities].input of text/image/pdf. Sibling lx1-opus-4.8 correctly pairs attachment = false with input = ["text"]. Callers will still see multimodal input support on Opus 5 / Sonnet 5. Action: If these lanes are text-only like Opus 4.8, also override [modalities].input = ["text"] (and match any other real capability deltas); if vision/PDF still work, drop the incomplete attachment = false override or justify it.

…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.
@ATOM00blue

Copy link
Copy Markdown
Author

Thanks — the reasoning-options criticism was correct on all counts. Fixed in cff2408.

1 & 2, toggle paired with effort containing none (high). Agreed, and I've
dropped toggle rather than keep both shapes. LayerX1 has no separate boolean enable:
reasoning is requested through a single reasoning effort parameter whose none value
is the off switch, so a toggle duplicated effort = none. You were also right to
reject the include_reasoning defence — that controls whether reasoning text is
returned, not whether the model reasons, so it does not justify a second control. All
reasoning files now carry exactly one shape, which makes item 2 moot. I removed that
claim from provider.toml too, since it was no longer load-bearing.

3, budget_tokens (medium). Removed. Checked /v1/models: no budget or thinking
parameter is advertised for any model — the only reasoning-related entry in
supported_parameters is reasoning. Anthropic-style budgets are accepted on the
inbound Anthropic wire but collapse onto the effort ladder, which as you say is not a
budget control. Declaring it would have overstated the surface.

4 & 5, reasoning = false on lx1-kimi-k2.5 and lx1-qwen-turbo (medium). These
are intentional and I've cited the evidence inline. /v1/models omits reasoning from
both capabilities.reasoning and supported_parameters for these two ids, while
sibling reasoning lanes such as lx1-deepseek-v3.2 list it in both. So the host's own
declaration is that these lanes are served non-thinking, independent of upstream
capability. Happy to drop the ids entirely if you would rather not carry a
non-thinking lane for a thinking model.

6, incomplete text-only overrides (medium). Real bug, thank you. Rather than patch
the two files I fixed the rule that produced them: attachment is now true when the
lane accepts any file, so it can no longer contradict a vision-capable model, and
modalities.input is filtered by capability — image/video gate on vision, pdf
gates on documents. Your example generalised further than the two models you flagged:
the same fault had left video on the Kimi lanes while they declared
attachment = false.

Net effect: lx1-opus-5 and lx1-sonnet-5 are now ["text", "image"] with
attachment inherited true; lx1-opus-4.8 is unchanged at ["text"]. I also added an
assertion over all 32 models that attachment, every modalities.input entry, and
reasoning agree with the capability flags /v1/models reports — it now reports zero
inconsistencies, and bun validate passes.

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [possible mistake] providers/layerx1/models/lx1-qwen3-235b.toml:1 - Check: Provider base_model must name the actual lab model, and host limits must match that identity. Why: base_model = "alibaba/qwen3-235b-a22b" is the original hybrid reasoner (reasoning = true, lab limit.context = 131_072), but this file sets context = 262_144 — the lab context of alibaba/qwen3-235b-a22b-instruct-2507 (reasoning = false). That mix risks the wrong lab identity and wrong capability inheritance. Action: Confirm against LayerX1 /v1/models which checkpoint lx1-qwen3-235b is. Point base_model at that lab entry (add it if missing), and keep only real host deltas for limit / reasoning / reasoning_options.
  • [medium] [possible mistake] providers/layerx1/models/lx1-qwen3-next-80b.toml:8 - Check: Host limit.context overrides should reflect the served window, not exceed the lab entry without evidence. Why: Lab alibaba/qwen3-next-80b-a3b-instruct is 131_072, but this file raises context to 262_144. Action: Verify 262_144 from LayerX1’s catalog/docs for this id; if the host still serves 131k, drop the override (or correct the value).
  • [medium] [possible mistake] providers/layerx1/models/lx1-minimax-m2.5.toml:12 - Check: Host output limits should match the provider’s published max generation size. Why: Lab minimax/MiniMax-M2.5 has output = 131_072, but this file sets output = 8_192 (and trims context to 196_608). That is a large capability cut and will mislead clients if the API allows more. Action: Confirm both limits from LayerX1 /v1/models (or docs) for lx1-minimax-m2.5 and correct them if the catalog differs.
  • [low] [possible mistake] providers/layerx1/models/lx1-deepseek-v3.2.toml:14 - Check: Host limits should not silently exceed the lab baseline without a catalog source. Why: Lab deepseek/deepseek-v3.2 is context = 128_000, but this file sets 131_072. Same pattern on lx1-grok-4.3 (output = 32_000 vs lab 30_000). Action: Verify these values on LayerX1’s model catalog and align the TOMLs (or cite the exact catalog fields in a leading comment if the higher host limits are intentional).

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.

2 participants