Skip to content

Add provider: Byesu (AI API gateway)#3213

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

Add provider: Byesu (AI API gateway)#3213
amdmsz wants to merge 2 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!

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