Skip to content

docs: add Y-API provider page - #1515

Open
jiweiyeah wants to merge 4 commits into
BerriAI:mainfrom
jiweiyeah:feat/add-y-api-docs
Open

jiweiyeah wants to merge 4 commits into
BerriAI:mainfrom
jiweiyeah:feat/add-y-api-docs

Conversation

@jiweiyeah

Copy link
Copy Markdown

What

Adds the docs page for the Y-API provider: docs/providers/y-api.md, plus the
corresponding sidebars.js entry in its alphabetical slot (between xinference and zai).

Why

Companion to BerriAI/litellm#41559, which registers Y-API as a JSON-configured
OpenAI-compatible provider. That PR's provider_endpoints_support.json entry points its
url field at:

"url": "https://docs.litellm.ai/docs/providers/y-api",

which 404s until this page exists. The alternative — dropping url the way chutes and
poe do — is also fine if you'd rather keep the matrix link-free; I went with the page
since the provider is JSON-configured and therefore has no code module to carry the
documentation.

Page contents

  • Overview table — provider route y-api/, base URL, the four supported operations.
  • Required variables — YAPI_API_KEY.
  • Usage — Python SDK (non-streaming + streaming), proxy server, legacy /completions,
    /responses, and /v1/messages through the proxy.
  • Model list — the fifteen models GET /v1/models currently returns, with prices.
  • Two-slash model ids — y-api/deepseek/deepseek-v4-flash resolves on the first slash
    and forwards deepseek/deepseek-v4-flash upstream unchanged. Worth calling out because
    every Y-API model id carries an upstream org prefix, so every model string has two
    slashes. There is a test for exactly this case in the main PR.
  • Reasoning — the relay accepts a narrower reasoning_effort set than the labs it
    fronts, so the page lists what each model actually takes (gpt-5.6-* up to xhigh,
    gpt-6-astra no none, tencent/hy3 only low/high). All measured against the live
    API, n=5 per level.
  • Token limits — the openai/* models require max_completion_tokens.
  • Embeddings — not served, so litellm.embedding() is unsupported.

I verified every code sample on this page against the live endpoint through a local
LiteLLM proxy built from the branch in #41559.

Checklist

  • docs/providers/y-api.md added
  • sidebars.js updated in alphabetical position
  • Every example verified end-to-end against the live API
  • No url in the main PR's matrix points at a 404 after this lands

Companion to the provider registration in BerriAI/litellm. The
provider_endpoints_support.json entry points its `url` field at
/docs/providers/y-api, which currently 404s.

Covers the base URL, the two-slash model id resolution, the four
supported routes, the current model list, and the reasoning-effort
levels the relay actually accepts.
@vercel

vercel Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
litellm Ready Ready Preview Oct 4, 2026 7:06am UTC

Request Review

The table listed $0.05/M output; the published cash price is
$0.025/M. Every other row was re-checked against the same
source and matches.
The page claimed LiteLLM already sends `max_completion_tokens` for the
`openai/*` models. It does not: the parameter is forwarded verbatim, which is
why the provider entry now declares a `max_tokens` -> `max_completion_tokens`
mapping.
@jiweiyeah

Copy link
Copy Markdown
Author

Correction pushed in e2968f5402.

The "Token limits" section claimed LiteLLM already sends max_completion_tokens for the openai/* models. That was wrong — the parameter is forwarded verbatim, which is exactly why the provider entry in BerriAI/litellm#41559 now declares a max_tokens → max_completion_tokens mapping. The section now says both spellings behave identically through LiteLLM.

Verified by pointing the provider at a local echo server and reading the outbound body: max_tokens=16 produced {"max_tokens": 16} before the mapping and {"max_completion_tokens": 16} after it.

@jiweiyeah

Copy link
Copy Markdown
Author

It's been ~2.5 weeks since this was opened (Sep 17) and it's been green since: Vercel preview deployed, and the docs page builds. Nothing has changed on my side and the content is one page plus the nav entry.

If the holdup is anything specific — the docs.litellm.ai/providers/advanced/write-pass-through guidance, the base URL quoting style, or anything else — I'll adjust it today. mergeable is clean; the only remaining blocker is a maintainer review.

Also pinging in case it got buried: the sibling provider-registration PR (BerriAI/litellm#41559) and its companion fix (BerriAI/litellm#43784) are still open. Happy to reorder or split them, whichever is easier for you to land.

… snapshot

The previous table was computed under a limited-time 1:20 top-up promo
that ended 2026-10-01, so every cash figure doubled when the rate
reverted to 1:10. Recomputed as credit_price / top_up.quota_rate from
https://y-api.bestvirtualgoods.com/pricing.json on 2026-10-04, with the
conversion and its history explained on the page so the table cannot be
silently trusted after the next rate move.

Also: terra and astra are gone from the host (503, absent from
GET /v1/models) — removed from the price table and the reasoning-effort
table, with a dated note of why. The remaining seven current catalog
models that were missing from the old fifteen-model snapshot are now
listed (anthropic x2, minimax-m2.7, kimi-k2.6, step-3.7-flash,
hy4-preview, mimo-v2.6-flash). The provider blurb's brand list was
extended to the ten vendors actually served.
@jiweiyeah

Copy link
Copy Markdown
Author

Refreshed today after a pricing-basis change on our side (6a4211a9), so the table is correct at merge time:

  • The limited-time 1:20 top-up promo ended 2026-10-01; the conversion is now fixed at $1 paid = $10 credit (top_up.quota_rate: 10, is_promotional: false in pricing.json, read 2026-10-04). Every cash figure in the previous version of the table was computed under the old promo, so all of them doubled.
  • The table now lists all 20 models the gateway serves today (values read from pricing.json), where the old snapshot had 15 and was missing seven current models. openai/gpt-5.6-terra and openai/gpt-6-astra were dropped: both return 503 "No available channel" and are absent from GET /v1/models as of today.
  • The page now states the conversion with its history and cites pricing.json with the snapshot date, so a future rate move is visible rather than silently wrong.

This branch was successfully deployed

1 active deployment
Preview — 6a4211a9 Deployed Oct 4, 2026 by vercel[bot]
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