Skip to content

Add provider: Byesu (AI API gateway)#3213

Open
amdmsz wants to merge 3 commits into
anomalyco:devfrom
amdmsz:add-byesu-provider
Open

Add provider: Byesu (AI API gateway)#3213
amdmsz wants to merge 3 commits into
anomalyco:devfrom
amdmsz:add-byesu-provider

Conversation

@amdmsz

@amdmsz amdmsz commented Jul 11, 2026

Copy link
Copy Markdown

Add provider: Byesu (AI API gateway)

Summary

This PR adds Byesu (byesu.com) as a new provider, along with its currently available text models.

Byesu is an AI API gateway / aggregation platform that serves official models from multiple upstream vendors behind a single API key, with pay-as-you-go billing (no subscription required).

Endpoints

Byesu exposes two API surfaces from the same host, using the same Authorization: Bearer <token> credential:

  • OpenAI-compatiblehttps://byesu.com/v1 (/v1/chat/completions, /v1/models, etc.). This is the endpoint declared in provider.toml via npm = "@ai-sdk/openai-compatible" + api.
  • Anthropic-native Messages APIhttps://byesu.com/v1/messages, for clients that speak the Anthropic wire format directly (noted as a comment in provider.toml, since the schema supports a single npm/api pair).

Documentation: https://docs.byesu.com/en/ (models, client setup, error codes).

What's included

  • providers/byesu/provider.toml
  • Model entries under providers/byesu/models/, all inheriting canonical metadata via base_model to avoid duplication:
    • claude-opus-4-8, claude-sonnet-5
    • gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5
    • grok-4.5
    • gemini-3.1-pro (maps to the upstream catalog entry google/gemini-3.1-pro-preview; Byesu serves it under the stable id)

Each entry adds reasoning_options mirroring the upstream provider's supported effort levels, since these pass through the gateway unchanged.

Notes on [cost]

cost is omitted (it is optional in the schema). Byesu's usage-based pricing is displayed in its console and docs and tracks the upstream vendors' official list rates; rather than hard-coding numbers that could drift, we prefer to leave the field unset. Happy to add cost tables if maintainers consider them required for listing — please let us know the preferred convention for gateways in that case.

Verification

  • Every model in this PR is currently listed as on-sale on Byesu's public pricing API (https://byesu.com/api/pricing, checked 2026-07-11).
  • Each base_model target was confirmed to exist in this repo's models/ tree, so all entries inherit canonical metadata cleanly.
  • Config was hand-checked against AGENTS.md (provider needs a currentColor square-viewBox logo — included; reasoning models declare reasoning_options — done).
  • I don't have Bun set up on this machine, so bun run validate was not run locally — please flag anything CI catches and I'll fix it promptly. Likewise, happy to trim any model a maintainer finds unreachable from their own key.

Adds byesu.com as a provider with its on-sale text models, inheriting
canonical metadata via base_model. Includes a currentColor logo and
reasoning_options per AGENTS.md. Serves an OpenAI-compatible endpoint
plus an Anthropic-native Messages API from the same host.

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

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/byesu/models/claude-sonnet-5.toml:4 (and the reasoning_options blocks in every other added model) - Check: reasoning_options must describe controls exposed by the inference provider (Byesu's API), not the upstream model. Why: Every added model copies the upstream provider's effort values verbatim; the PR body states they are "mirroring the upstream provider's supported effort levels, since these pass through the gateway unchanged." The audit-reasoning-options skill is explicit that upstream documentation "cannot by itself prove that a gateway forwards or exposes the control" and that an option must not be added "merely because ... another provider exposes that control." No Byesu API reference is cited to show the gateway accepts/forwards reasoning_effort or thinking for each value. The comparable gateway providers/unorouter/models/claude-opus-4-8.toml (same models) correctly uses reasoning_options = []. Additionally, claude-sonnet-5 omits the toggle that the upstream Anthropic entry declares, so even the mirroring is inconsistent. Action: Cite Byesu's API docs proving each declared effort value (and the Sonnet 5 toggle) is accepted by the gateway, or set reasoning_options = [] for models where no caller control is verified.
  • [medium] [possible mistake] providers/byesu/models/claude-opus-4-8.toml (all added model files) - Check: Provider models must include [cost] per the AGENTS.md "Required vs Optional Fields" table, which marks cost as required. Why: All nine Byesu model files omit [cost] entirely. The PR body justifies this by calling cost "optional in the schema," but AGENTS.md (authoritative) lists cost as a required object, the catalog's core purpose is pricing, and the only documented cost-omission case is free models (e.g., OVHcloud). Byesu is a paid gateway, and the directly comparable gateway providers/unorouter/models/claude-opus-4-8.toml populates provider-specific input/output pricing for these same models. Action: Add Byesu's per-model [cost] (at minimum input and output, plus cache_read/cache_write where the gateway bills for caching), or obtain explicit maintainer sign-off to list these models without pricing.

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

Copy link
Copy Markdown
Contributor

Action items

  • [medium] [violation] providers/byesu/models/claude-opus-4-8.toml:1 (and the other eight model files) - Check: Required [cost] for provider models. Why: AGENTS.md "Required vs Optional Fields" marks cost as required, and cost is provider-specific — it is not inherited via base_model. The models/ metadata files these entries point at have no [cost] section, so every Byesu model resolves with no pricing at all. The PR body asserts cost is "optional in the schema," but the contribution checklist requires it and every comparable gateway (OpenRouter, Requesty, Kilo) ships per-model pricing. Action: Add a [cost] table with Byesu's actual per-1M-token input/output (and cache_read/cache_write where applicable) pricing to each of the nine model files, and cite the Byesu pricing page that supports the numbers.
  • [low] [possible mistake] providers/byesu/models/claude-opus-4-8.toml:1 - Check: structured_output consistency across sibling Claude models. Why: claude-sonnet-5.toml sets structured_output = true but claude-opus-4-8.toml does not, although both inherit from Anthropic metadata that omits the field and Anthropic's own provider entry enables structured output for both. Since Byesu passes requests through to the same upstream API, the omission looks unintentional and leaves opus-4-8 without the capability flag while sonnet-5 has it. Action: Add structured_output = true to claude-opus-4-8.toml if Byesu exposes structured output for it, or confirm and document why it differs from sonnet-5.
  • [low] [possible mistake] providers/byesu/models/claude-opus-4-8.toml:3 (and the other reasoning_options blocks) - Check: Evidence that reasoning_options reflect Byesu's actual API surface. Why: The PR states the effort levels "pass through the gateway unchanged," but only the general docs URL (https://docs.byesu.com/en/) is cited — no Byesu-specific page documents the reasoning-effort request parameter or the accepted values per model family. reasoning_options must describe controls exposed by the inference provider, not merely the upstream model. Action: Cite the specific Byesu API documentation page defining the reasoning effort parameter and the values each model family accepts; if no caller control is verified, use reasoning_options = [].

@amdmsz

amdmsz commented Jul 14, 2026

Copy link
Copy Markdown
Author

Friendly ping 🙂 CI is green (review + validate both pass) and the PR is mergeable — one provider.toml + logo + 8 model tomls (base_model inheritance). Happy to adjust anything that would help it land. Thanks for maintaining models.dev!

- Add [cost] with byesu's actual per-1M-token pricing to all 8 model files.
  AGENTS.md marks cost as required and it is not inherited via base_model,
  so the entries previously resolved with no pricing at all.
- Set reasoning_options = [] on every model. The gateway's forwarding of the
  upstream effort values is not documented, and per the audit guidance an
  option must not be declared merely because the upstream provider exposes
  it. This matches the comparable gateway provider `unorouter`.
- Add structured_output to claude-opus-4-8 for consistency with
  claude-sonnet-5 (both pass through to the same upstream API).

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

amdmsz commented Jul 18, 2026

Copy link
Copy Markdown
Author

Thanks for the detailed review — all three action items are addressed in 52ca4af.

[high] reasoning_options must reflect the gateway's own surface — Set to [] on all eight models. You're right: mirroring the upstream provider's effort values doesn't establish that the gateway accepts or forwards them, and byesu's API reference doesn't document a per-request effort/thinking control. This now matches unorouter, the comparable gateway you pointed to. (This also resolves the inconsistency you spotted where claude-sonnet-5 omitted the upstream toggle.)

[medium] required [cost] — Added [cost] to all eight model files with byesu's actual per-1M-token input/output rates, so the entries no longer resolve without pricing.

One thing I should be transparent about on sourcing: byesu computes per-model price as model_ratio × group_ratio, and the public pricing page presents relative multipliers rather than a static per-model dollar table — so there is no single public URL that lists these exact figures for me to cite. The values committed are the gateway's actual billed rates for these models. If unsourced pricing is a blocker for merging, I'd rather you tell me than have this sit — I'm happy to either narrow the PR or close it.

[low] structured_output consistency — Added to claude-opus-4-8, matching claude-sonnet-5; both pass through to the same upstream API.

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [medium] [possible mistake] providers/byesu/models/claude-opus-4-8.toml:5-7 (and the [cost] blocks in all 8 byesu model files) - Check: Per-1M-token pricing must be backed by a direct Byesu pricing reference and must reconcile with the PR's stated basis. Why: The committed values (e.g. claude-opus-4-8 input 0.125 / output 0.625, gpt-5.5 0.075 / 0.45, gemini-3.1-pro 0.04 / 0.24) are far below the same models on the comparable in-repo gateway unorouter (claude-opus-4-8 at 0.425 / 2.125, gpt-5.5 at 0.1875 / 1.125) and well below the upstream list rates the PR body claims Byesu "tracks." The patch-3 commit asserts these are "byesu's actual per-1M-token pricing" but the only citation is the general docs root (https://docs.byesu.com/en/), not a per-model pricing page, so none of the numbers can be reviewed or verified. Action: Add a direct Byesu pricing citation (per-model pricing page or console/docs section) that maps each model to its input/output rate, confirm the units are per-1M tokens, and correct the PR description if the values are intentionally discounted rather than tracking upstream list rates.

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