From 9f04cdebcb03f49a21076912139b82803a3c2722 Mon Sep 17 00:00:00 2001 From: jiweiyeah Date: Wed, 16 Sep 2026 19:08:35 +0800 Subject: [PATCH 1/3] feat(provider): add Y-API Adds the Y-API OpenAI-compatible gateway with the 14 models it currently serves, all as base_model overrides. - Model list: authenticated GET /v1/models (2026-09-16) - Pricing: https://y-api.bestvirtualgoods.com/pricing - Costs are USD cash price (credit price / promotional 20x top-up rate) - reasoning_options and interleaved verified against the live API --- providers/y-api/logo.svg | 3 +++ .../models/deepseek/deepseek-v4-flash-0731.toml | 14 ++++++++++++++ .../y-api/models/deepseek/deepseek-v4-flash.toml | 15 +++++++++++++++ .../y-api/models/deepseek/deepseek-v4-pro.toml | 11 +++++++++++ .../models/deepseek/deepseek-v4.1-flash.toml | 14 ++++++++++++++ providers/y-api/models/moonshotai/kimi-k3.toml | 15 +++++++++++++++ providers/y-api/models/openai/gpt-5.6-luna.toml | 8 ++++++++ providers/y-api/models/openai/gpt-5.6-sol.toml | 8 ++++++++ providers/y-api/models/openai/gpt-5.6-terra.toml | 8 ++++++++ providers/y-api/models/openai/gpt-6-astra.toml | 9 +++++++++ providers/y-api/models/tencent/hy3.toml | 11 +++++++++++ providers/y-api/models/xiaomi/mimo-v2.5.toml | 11 +++++++++++ providers/y-api/models/z-ai/glm-5.2.toml | 10 ++++++++++ providers/y-api/models/z-ai/glm-5.3-flash.toml | 10 ++++++++++ providers/y-api/models/z-ai/glm-5.3.toml | 10 ++++++++++ providers/y-api/provider.toml | 8 ++++++++ 16 files changed, 165 insertions(+) create mode 100644 providers/y-api/logo.svg create mode 100644 providers/y-api/models/deepseek/deepseek-v4-flash-0731.toml create mode 100644 providers/y-api/models/deepseek/deepseek-v4-flash.toml create mode 100644 providers/y-api/models/deepseek/deepseek-v4-pro.toml create mode 100644 providers/y-api/models/deepseek/deepseek-v4.1-flash.toml create mode 100644 providers/y-api/models/moonshotai/kimi-k3.toml create mode 100644 providers/y-api/models/openai/gpt-5.6-luna.toml create mode 100644 providers/y-api/models/openai/gpt-5.6-sol.toml create mode 100644 providers/y-api/models/openai/gpt-5.6-terra.toml create mode 100644 providers/y-api/models/openai/gpt-6-astra.toml create mode 100644 providers/y-api/models/tencent/hy3.toml create mode 100644 providers/y-api/models/xiaomi/mimo-v2.5.toml create mode 100644 providers/y-api/models/z-ai/glm-5.2.toml create mode 100644 providers/y-api/models/z-ai/glm-5.3-flash.toml create mode 100644 providers/y-api/models/z-ai/glm-5.3.toml create mode 100644 providers/y-api/provider.toml diff --git a/providers/y-api/logo.svg b/providers/y-api/logo.svg new file mode 100644 index 00000000000..eb20de0dd41 --- /dev/null +++ b/providers/y-api/logo.svg @@ -0,0 +1,3 @@ + + + diff --git a/providers/y-api/models/deepseek/deepseek-v4-flash-0731.toml b/providers/y-api/models/deepseek/deepseek-v4-flash-0731.toml new file mode 100644 index 00000000000..e41780e097c --- /dev/null +++ b/providers/y-api/models/deepseek/deepseek-v4-flash-0731.toml @@ -0,0 +1,14 @@ +# Toggle: thinking.type = enabled|disabled +# Effort: reasoning_effort = low|high|max +base_model = "deepseek/deepseek-v4-flash-0731" +reasoning_options = [ + { type = "toggle" }, + { type = "effort", values = ["low", "high", "max"] }, +] + +[interleaved] +field = "reasoning_content" + +[cost] +input = 0.0075 +output = 0.015 diff --git a/providers/y-api/models/deepseek/deepseek-v4-flash.toml b/providers/y-api/models/deepseek/deepseek-v4-flash.toml new file mode 100644 index 00000000000..3b8d4979c3a --- /dev/null +++ b/providers/y-api/models/deepseek/deepseek-v4-flash.toml @@ -0,0 +1,15 @@ +# Toggle: thinking.type = enabled|disabled +# Effort: reasoning_effort = low|high|max +# Cost: free tier — no credit is deducted (https://y-api.bestvirtualgoods.com/pricing). +base_model = "deepseek/deepseek-v4-flash" +reasoning_options = [ + { type = "toggle" }, + { type = "effort", values = ["low", "high", "max"] }, +] + +[interleaved] +field = "reasoning_content" + +[cost] +input = 0 +output = 0 diff --git a/providers/y-api/models/deepseek/deepseek-v4-pro.toml b/providers/y-api/models/deepseek/deepseek-v4-pro.toml new file mode 100644 index 00000000000..c576582eb47 --- /dev/null +++ b/providers/y-api/models/deepseek/deepseek-v4-pro.toml @@ -0,0 +1,11 @@ +# Toggle: thinking.type = enabled|disabled +# Effort: reasoning_effort = high|max +base_model = "deepseek/deepseek-v4-pro" +reasoning_options = [ + { type = "toggle" }, + { type = "effort", values = ["high", "max"] }, +] + +[cost] +input = 0.025 +output = 0.05 diff --git a/providers/y-api/models/deepseek/deepseek-v4.1-flash.toml b/providers/y-api/models/deepseek/deepseek-v4.1-flash.toml new file mode 100644 index 00000000000..b46c6b9b714 --- /dev/null +++ b/providers/y-api/models/deepseek/deepseek-v4.1-flash.toml @@ -0,0 +1,14 @@ +# Toggle: thinking.type = enabled|disabled +# Effort: reasoning_effort = low|medium|high|xhigh|max +base_model = "deepseek/deepseek-v4.1-flash" +reasoning_options = [ + { type = "toggle" }, + { type = "effort", values = ["low", "medium", "high", "xhigh", "max"] }, +] + +[interleaved] +field = "reasoning_content" + +[cost] +input = 0.01 +output = 0.05 diff --git a/providers/y-api/models/moonshotai/kimi-k3.toml b/providers/y-api/models/moonshotai/kimi-k3.toml new file mode 100644 index 00000000000..8d3464dee06 --- /dev/null +++ b/providers/y-api/models/moonshotai/kimi-k3.toml @@ -0,0 +1,15 @@ +# Toggle: thinking.type = enabled|disabled +# Effort: reasoning_effort = low|high|max +# Reasoning text arrives as reasoning_details, not reasoning_content (live API, 2026-09-16). +base_model = "moonshotai/kimi-k3" +reasoning_options = [ + { type = "toggle" }, + { type = "effort", values = ["low", "high", "max"] }, +] + +[interleaved] +field = "reasoning_details" + +[cost] +input = 0.15 +output = 0.75 diff --git a/providers/y-api/models/openai/gpt-5.6-luna.toml b/providers/y-api/models/openai/gpt-5.6-luna.toml new file mode 100644 index 00000000000..c900de051a0 --- /dev/null +++ b/providers/y-api/models/openai/gpt-5.6-luna.toml @@ -0,0 +1,8 @@ +# Effort: reasoning_effort = none|low|medium|high|xhigh +# The live API rejects `max` for this model; no reasoning text is exposed. +base_model = "openai/gpt-5.6-luna" +reasoning_options = [{ type = "effort", values = ["none", "low", "medium", "high", "xhigh"] }] + +[cost] +input = 0.015 +output = 0.065 diff --git a/providers/y-api/models/openai/gpt-5.6-sol.toml b/providers/y-api/models/openai/gpt-5.6-sol.toml new file mode 100644 index 00000000000..12bf390e930 --- /dev/null +++ b/providers/y-api/models/openai/gpt-5.6-sol.toml @@ -0,0 +1,8 @@ +# Effort: reasoning_effort = none|low|medium|high|xhigh +# The live API rejects `max` for this model; no reasoning text is exposed. +base_model = "openai/gpt-5.6-sol" +reasoning_options = [{ type = "effort", values = ["none", "low", "medium", "high", "xhigh"] }] + +[cost] +input = 0.25 +output = 1.5 diff --git a/providers/y-api/models/openai/gpt-5.6-terra.toml b/providers/y-api/models/openai/gpt-5.6-terra.toml new file mode 100644 index 00000000000..d36c4bb3bf2 --- /dev/null +++ b/providers/y-api/models/openai/gpt-5.6-terra.toml @@ -0,0 +1,8 @@ +# Effort: reasoning_effort = none|low|medium|high|xhigh +# The live API rejects `max` for this model; no reasoning text is exposed. +base_model = "openai/gpt-5.6-terra" +reasoning_options = [{ type = "effort", values = ["none", "low", "medium", "high", "xhigh"] }] + +[cost] +input = 0.1 +output = 0.6 diff --git a/providers/y-api/models/openai/gpt-6-astra.toml b/providers/y-api/models/openai/gpt-6-astra.toml new file mode 100644 index 00000000000..5d07e2c7464 --- /dev/null +++ b/providers/y-api/models/openai/gpt-6-astra.toml @@ -0,0 +1,9 @@ +# Effort: reasoning_effort = low|medium|high|xhigh — no `none` and no `max`, per the +# live API error text; no reasoning text is exposed. +# This model also rejects `max_tokens` and requires `max_completion_tokens`. +base_model = "openai/gpt-6-astra" +reasoning_options = [{ type = "effort", values = ["low", "medium", "high", "xhigh"] }] + +[cost] +input = 0.5 +output = 2.5 diff --git a/providers/y-api/models/tencent/hy3.toml b/providers/y-api/models/tencent/hy3.toml new file mode 100644 index 00000000000..3069f5ecf0a --- /dev/null +++ b/providers/y-api/models/tencent/hy3.toml @@ -0,0 +1,11 @@ +# Effort: reasoning_effort = none|low|high +# Cost: free tier — no credit is deducted (https://y-api.bestvirtualgoods.com/pricing). +base_model = "tencent/hy3" +reasoning_options = [{ type = "effort", values = ["none", "low", "high"] }] + +[interleaved] +field = "reasoning_content" + +[cost] +input = 0 +output = 0 diff --git a/providers/y-api/models/xiaomi/mimo-v2.5.toml b/providers/y-api/models/xiaomi/mimo-v2.5.toml new file mode 100644 index 00000000000..b257ff0c8eb --- /dev/null +++ b/providers/y-api/models/xiaomi/mimo-v2.5.toml @@ -0,0 +1,11 @@ +# Toggle: thinking.type = enabled|disabled +# Cost: free tier — no credit is deducted (https://y-api.bestvirtualgoods.com/pricing). +base_model = "xiaomi/mimo-v2.5" +reasoning_options = [{ type = "toggle" }] + +[interleaved] +field = "reasoning_content" + +[cost] +input = 0 +output = 0 diff --git a/providers/y-api/models/z-ai/glm-5.2.toml b/providers/y-api/models/z-ai/glm-5.2.toml new file mode 100644 index 00000000000..8c747c26c70 --- /dev/null +++ b/providers/y-api/models/z-ai/glm-5.2.toml @@ -0,0 +1,10 @@ +# Effort: reasoning_effort = high|max; thinking is always on. +base_model = "zhipuai/glm-5.2" +reasoning_options = [{ type = "effort", values = ["high", "max"] }] + +[interleaved] +field = "reasoning_content" + +[cost] +input = 0.07 +output = 0.22 diff --git a/providers/y-api/models/z-ai/glm-5.3-flash.toml b/providers/y-api/models/z-ai/glm-5.3-flash.toml new file mode 100644 index 00000000000..8e01f3e8084 --- /dev/null +++ b/providers/y-api/models/z-ai/glm-5.3-flash.toml @@ -0,0 +1,10 @@ +# Effort: reasoning_effort = low|high|max; thinking is always on. +base_model = "zhipuai/glm-5.3-flash" +reasoning_options = [{ type = "effort", values = ["low", "high", "max"] }] + +[interleaved] +field = "reasoning_content" + +[cost] +input = 0.0075 +output = 0.025 diff --git a/providers/y-api/models/z-ai/glm-5.3.toml b/providers/y-api/models/z-ai/glm-5.3.toml new file mode 100644 index 00000000000..302785bd235 --- /dev/null +++ b/providers/y-api/models/z-ai/glm-5.3.toml @@ -0,0 +1,10 @@ +# Effort: reasoning_effort = low|high|max; thinking is always on. +base_model = "zhipuai/glm-5.3" +reasoning_options = [{ type = "effort", values = ["low", "high", "max"] }] + +[interleaved] +field = "reasoning_content" + +[cost] +input = 0.07 +output = 0.25 diff --git a/providers/y-api/provider.toml b/providers/y-api/provider.toml new file mode 100644 index 00000000000..cb480122177 --- /dev/null +++ b/providers/y-api/provider.toml @@ -0,0 +1,8 @@ +# Cost basis: USD cash price. The published catalog quotes account credit +# (https://y-api.bestvirtualgoods.com/pricing); credit is topped up at a +# promotional 20x rate, so every value here is the credit price / 20. +name = "Y-API" +env = ["Y_API_API_KEY"] +npm = "@ai-sdk/openai-compatible" +api = "https://api.y-api.bestvirtualgoods.com/v1" +doc = "https://y-api.bestvirtualgoods.com/docs" From 5c101ecba7f41e573e6196a5ad5dde2aa6b70720 Mon Sep 17 00:00:00 2001 From: jiweiyeah Date: Wed, 16 Sep 2026 20:12:39 +0800 Subject: [PATCH 2/3] fix(provider): correct Y-API interleaved fields and effort set Addresses the review on #7235. - deepseek/deepseek-v4-pro: author `[interleaved] field = "reasoning_details"`. The review was right that reasoning text is returned. Re-probed at n=14: reasoning_content appeared 0/14 times, reasoning_details ({type: "reasoning.text"}) 14/14. The earlier "unstable across 3 samples" note was an artefact of the sample size. The lab uses reasoning_content; this host does not, so the override describes the host. - deepseek/deepseek-v4.1-flash: drop medium and xhigh, matching the lab baseline and the sibling Y-API DeepSeek Flash entries. The host accepts both without error but does not act on them distinctly: medium's full observed range (104-108 reasoning tokens) sits inside high's (104-139), and the sibling flash-0731 is non-monotonic across the same set. - z-ai/glm-5.2: field was reasoning_content, which this host returned on 0 of 10 calls. It returns reasoning_details on 8 of 10. Corrected. Found by re-checking every [interleaved] declaration at n>=6, not only the one flagged. - provider.toml: cite the two pages that state the 20x credit rate, with the access date, so the cost transform is reviewable. Also note the rate is advertised as limited-time (reverts to 1:10, doubling every cost). Re-verified: bun validate passes; bun run test still 337 pass / 7 fail, the same 7 pre-existing failures. All other [interleaved] declarations re-confirmed at n>=6: hy3 and mimo-v2.5 reasoning_content 6/6; glm-5.3 and glm-5.3-flash reasoning_content 10/10; kimi-k3 reasoning_details 8/10; the four OpenAI models expose no side channel (0/6), so omitting the field there is correct. --- .../models/deepseek/deepseek-v4-pro.toml | 11 +++++++++ .../models/deepseek/deepseek-v4.1-flash.toml | 23 +++++++++++++++++-- providers/y-api/models/z-ai/glm-5.2.toml | 7 +++++- providers/y-api/provider.toml | 18 ++++++++++++--- 4 files changed, 53 insertions(+), 6 deletions(-) diff --git a/providers/y-api/models/deepseek/deepseek-v4-pro.toml b/providers/y-api/models/deepseek/deepseek-v4-pro.toml index c576582eb47..19225fd5962 100644 --- a/providers/y-api/models/deepseek/deepseek-v4-pro.toml +++ b/providers/y-api/models/deepseek/deepseek-v4-pro.toml @@ -1,11 +1,22 @@ # Toggle: thinking.type = enabled|disabled # Effort: reasoning_effort = high|max +# +# Interleaved field: this host does NOT emit reasoning_content for this model +# (0 of 14 samples, 2026-09-16). It emits reasoning (string) plus +# reasoning_details (list of one {type: "reasoning.text"}) on all 14 samples, +# which is why the field below is reasoning_details and not the lab's +# reasoning_content. The first-party DeepSeek V4 Pro entry uses +# reasoning_content; this host's response shape differs, so the override +# describes the host. base_model = "deepseek/deepseek-v4-pro" reasoning_options = [ { type = "toggle" }, { type = "effort", values = ["high", "max"] }, ] +[interleaved] +field = "reasoning_details" + [cost] input = 0.025 output = 0.05 diff --git a/providers/y-api/models/deepseek/deepseek-v4.1-flash.toml b/providers/y-api/models/deepseek/deepseek-v4.1-flash.toml index b46c6b9b714..f12414f15cf 100644 --- a/providers/y-api/models/deepseek/deepseek-v4.1-flash.toml +++ b/providers/y-api/models/deepseek/deepseek-v4.1-flash.toml @@ -1,9 +1,28 @@ # Toggle: thinking.type = enabled|disabled -# Effort: reasoning_effort = low|medium|high|xhigh|max +# Effort: reasoning_effort = low|high|max +# +# This host ACCEPTS medium and xhigh (no 400) but does not act on them +# distinctly, so they are not authored. Measured on this host, 2026-09-16: +# +# this model, usage.completion_tokens_details.reasoning_tokens, n=3/level +# low 84/116/78 medium 108/108/104 high 109/139/104 +# xhigh 131/87/132 max 140/134/128 +# Adjacent levels overlap: medium's whole range (104-108) sits inside +# high's (104-139), and xhigh's (87-132) is wider than the gap to either +# neighbour. Nothing here separates medium from high, or xhigh from high. +# +# control, sibling deepseek-v4-flash-0731 (same family, same host), +# reasoning_content length, n=5/level, means +# low 826 / medium 442 / high 453 / xhigh 648 / max 1801 +# which is not monotonic at all (max ranged 414-6790). +# +# An effort level a caller cannot observe is worse than not offering it, so +# this file authors the lab baseline set, matching the other Y-API DeepSeek +# Flash entries. base_model = "deepseek/deepseek-v4.1-flash" reasoning_options = [ { type = "toggle" }, - { type = "effort", values = ["low", "medium", "high", "xhigh", "max"] }, + { type = "effort", values = ["low", "high", "max"] }, ] [interleaved] diff --git a/providers/y-api/models/z-ai/glm-5.2.toml b/providers/y-api/models/z-ai/glm-5.2.toml index 8c747c26c70..ba20612cd26 100644 --- a/providers/y-api/models/z-ai/glm-5.2.toml +++ b/providers/y-api/models/z-ai/glm-5.2.toml @@ -1,9 +1,14 @@ # Effort: reasoning_effort = high|max; thinking is always on. +# +# Interleaved field: reasoning_details, not the lab's reasoning_content. This +# host returned reasoning_content on 0 of 10 calls (2026-09-16); it returned +# reasoning_details ({type: "reasoning.text"}) on 8 of 10, the other 2 carrying +# no side channel at all. The field that exists is the one authored. base_model = "zhipuai/glm-5.2" reasoning_options = [{ type = "effort", values = ["high", "max"] }] [interleaved] -field = "reasoning_content" +field = "reasoning_details" [cost] input = 0.07 diff --git a/providers/y-api/provider.toml b/providers/y-api/provider.toml index cb480122177..ad6f5e223bd 100644 --- a/providers/y-api/provider.toml +++ b/providers/y-api/provider.toml @@ -1,6 +1,18 @@ -# Cost basis: USD cash price. The published catalog quotes account credit -# (https://y-api.bestvirtualgoods.com/pricing); credit is topped up at a -# promotional 20x rate, so every value here is the credit price / 20. +# Cost basis: USD cash price. The published catalog quotes account credit, and +# credit is topped up at a promotional 20x rate, so every cost value here is +# the credit price / 20. +# +# The 20x rate is stated by the service itself, in two places, both read +# 2026-09-16: +# https://y-api.bestvirtualgoods.com/about +# "Top up $1 to receive $20 of account credit (limited-time rate; reverts +# to 1:10 afterwards)." +# https://y-api.bestvirtualgoods.com/pricing +# "limited-time top up $1 for $20 in credit (reverts to 1:10 afterwards)" +# +# Both pages also say the rate is limited-time and reverts to 1:10. When it +# does, every cost below doubles. The service is not reachable from mainland +# China and quotes no non-USD price, so no FX conversion is involved. name = "Y-API" env = ["Y_API_API_KEY"] npm = "@ai-sdk/openai-compatible" From a0d4a7f7ea77166a7f09e390d0ed1379f5cd31af Mon Sep 17 00:00:00 2001 From: jiweiyeah Date: Thu, 17 Sep 2026 12:48:33 +0800 Subject: [PATCH 3/3] feat(provider): add qwen/qwen3.8-flash to Y-API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The model is back in service: 5/5 200 on 2026-09-17, and it now appears in GET /v1/models (the catalog is 15 models, up from 14). Three things are authored from the wire rather than inherited from the lab entry, and each is commented in the file: - reasoning_options: an unlisted effort returns the supported set verbatim ("Unexpected reasoning effort minimal. Supported types are xhigh (default), medium, and low."), so the set is low|medium|xhigh. `none` also answered 200 but is not in that enumeration, so it is not authored. - [limit] context = 262144. The Alibaba Cloud entry advertises 1M, but this host rejects anything longer with "The input (2000052 tokens) is longer than the model's context length (262144 tokens)" — a ~4x overstatement if inherited. - No [interleaved]: this host returns the trace as a plain `reasoning` string, which is not a schema-valid interleaved.field. Cost is the USD cash price (credit / 20), per the provider.toml header. `bun validate` passes and resolves 15 models under y-api. --- .../y-api/models/qwen/qwen3.8-flash.toml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 providers/y-api/models/qwen/qwen3.8-flash.toml diff --git a/providers/y-api/models/qwen/qwen3.8-flash.toml b/providers/y-api/models/qwen/qwen3.8-flash.toml new file mode 100644 index 00000000000..e38103c3ea0 --- /dev/null +++ b/providers/y-api/models/qwen/qwen3.8-flash.toml @@ -0,0 +1,26 @@ +# Effort: reasoning_effort accepts low|medium|xhigh. An unlisted value returns the +# supported set verbatim, so this is read off the wire rather than from Alibaba's docs: +# "Unexpected reasoning effort minimal. Supported types are xhigh (default), +# medium, and low." +# `none` also answered 200 on this host (5/5), but it is not in that enumeration, so +# it is not authored here. +# +# No [interleaved]: this host returns the trace as a plain `reasoning` string +# (`message` keys are content/reasoning/role/tool_calls), which is not a +# schema-valid interleaved.field. Same reason the four OpenAI models omit it. +# +# [limit] is overridden. The Alibaba Cloud entry advertises a 1M context, but this +# host caps this model well below that: +# "The input (2000052 tokens) is longer than the model's context length (262144 tokens)." +# 262144 = 256K, so inheriting the base limit would overstate the window by ~4x. +# +# Cost: USD cash price (credit / 20), per the header in provider.toml. +base_model = "alibaba/qwen3.8-flash" +reasoning_options = [{ type = "effort", values = ["low", "medium", "xhigh"] }] + +[limit] +context = 262_144 + +[cost] +input = 0.01 +output = 0.025