Skip to content

feat(providers): add Inference APIs - #7346

Merged
rekram1-node merged 6 commits into
anomalyco:devfrom
TaylorHawkes:add-inferenceapis-provider
Nov 14, 2026
Merged

rekram1-node merged 6 commits into
anomalyco:devfrom
TaylorHawkes:add-inferenceapis-provider

Conversation

@TaylorHawkes

Copy link
Copy Markdown
Contributor

Adds Inference APIs (https://api.inferenceapis.com/v1), an OpenAI-compatible gateway serving open-weight chat models on pay-as-you-go prepaid credit. It implements /v1/chat/completions and /v1/responses for every chat model listed.

  • 9 chat models, all via base_model pointing at existing lab metadata, so no new models/ files.
  • Provider files are override-only: cost (with cache_read where cached input is discounted), reasoning_options, interleaved, and real deltas:
    • Kimi K2.7 Code: structured_output = false and text-only input on this host.
    • MiniMax M3: 524k context on this host.
    • DeepSeek V4 family: 1,048,576 context.
  • Reasoning controls are the ones the gateway actually honours: a toggle where thinking can be switched off, effort levels where it cannot (GPT-OSS, GLM).
  • Prices checked against https://inferenceapis.com/pricing on 2026-09-17.
  • logo.svg is a single path using currentColor.
  • bun validate passes.

Disclosure: I run this service.

🤖 Generated with Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [medium] [possible mistake] providers/inferenceapis/models/deepseek-ai/DeepSeek-V4-Pro.toml:100 - Check: DeepSeek V4 relay reasoning_options should match this host’s real controls against the lab/peer baseline (toggle + graded effort). Why: Lab DeepSeek Pro is toggle + high/max; Flash/V4.1 is toggle + low/high/max. These files only set { type = "toggle" }, but the leading comments document reasoning_effort = "none" as a working off path—so reasoning_effort is already a live wire field. If graded values also take effect, omitting them understates the API. Action: Verify whether reasoning_effort values beyond off are honored on this gateway; if yes, add the lab-matching effort list (Pro: high/max; Flash & V4.1-Flash: low/high/max) beside the toggle. If graded effort is truly ignored, keep toggle-only and state that explicitly in the header (not only that thinking can be turned off).
  • [medium] [possible mistake] providers/inferenceapis/models/zai-org/GLM-5.3.toml:217 - Check: GLM-5.3 effort baseline is lab/peer low/high/max when thinking cannot be disabled. Why: First-party zai/zhipuai and established relays (e.g. OpenRouter) expose ["low", "high", "max"] with default max. These entries use only ["low", "high"]. The comments justify no off control, not dropping max. Action: Confirm whether reasoning_effort = "max" works on Inference APIs; if it does, add "max" to both GLM-5.3.toml and GLM-5.3-Flash.toml. If max is rejected, document that host limitation in the leading comment.
  • [medium] [violation] providers/inferenceapis/models/moonshotai/Kimi-K2.7-Code.toml:168 - Check: Text-only modality overrides must keep attachment consistent with non-text input. Why: Base moonshotai/kimi-k2.7-code has attachment = true and image/video input. This file sets input = ["text"] but leaves attachment inherited as true, so the resolved model still claims attachments while modalities are text-only (peer pattern e.g. greenpt sets attachment = false with text-only). Action: Add attachment = false next to the text-only [modalities] override.

@TaylorHawkes

Copy link
Copy Markdown
Contributor Author

Addressed all three review items in the follow-up commit, using measurements against the live API (2 to 3 runs per setting, reasoning tokens compared):

  • DeepSeek V4 Flash / V4 Pro: now toggle + effort high|max. max roughly doubles reasoning tokens over the default; low and medium are accepted but measured the same as high, so they are not listed.
  • DeepSeek V4.1 Flash: now toggle + effort low|high|xhigh|max, which is exactly what the host validates (medium returns HTTP 400).
  • GLM 5.3 / 5.3 Flash: added max (measured low < high < max; max is the default).
  • Kimi K2.7 Code: added attachment = false next to the text-only modalities.

bun validate passes.

@github-actions

Copy link
Copy Markdown
Contributor

No actionable findings.

@github-actions github-actions Bot added the reviewer: ready Automated review found no actionable items label Sep 17, 2026
@github-actions github-actions Bot removed the reviewer: ready Automated review found no actionable items label Sep 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [possible mistake] providers/inferenceapis/models/moonshotai/Kimi-K2.7-Code.toml:8 - Check: Relay effort baseline must copy lab + same-surface peers, not invent toggle. Why: Lab providers/moonshotai/models/kimi-k2.7-code.toml and peers providers/openrouter/models/moonshotai/kimi-k2.7-code.toml, providers/vercel/models/moonshotai/kimi-k2.7-code.toml, providers/crossmodel/models/moonshot/kimi-k2.7-code.toml all use [] (always-on); only minority providers/deepinfra/models/moonshotai/Kimi-K2.7-Code.toml uses toggle. Claiming switchable thinking contradicts lab/majority. Action: Provide host docs or measured on/off proof for this gateway, or change to reasoning_options = [].
  • [high] [possible mistake] providers/inferenceapis/models/Qwen/Qwen3.8-Flash.toml:4 - Check: Relay must preserve lab/peer budget_tokens and effort when host forwards them. Why: Lab providers/alibaba/models/qwen3.8-flash.toml has toggle + effort ["low","medium","xhigh"] + budget_tokens max 262_144; peers providers/openrouter/models/qwen/qwen3.8-flash.toml and providers/vercel/models/alibaba/qwen3.8-flash.toml keep toggle + budget_tokens, providers/requesty/models/qwen3.8-flash.toml keeps effort + budget_tokens. Toggle-only drops budget/effort all peers/lab preserve. Action: Add budget_tokens (and effort if gateway forwards reasoning_effort/thinking_budget) with wire evidence, or document proof the gateway strips them.
  • [high] [possible mistake] providers/inferenceapis/models/deepseek-ai/DeepSeek-V4.1-Flash.toml:7 - Check: Do not add effort levels beyond lab/peers without host evidence. Why: Lab providers/deepseek/models/deepseek-flash.toml and peer providers/openrouter/models/deepseek/deepseek-v4.1-flash.toml are toggle + ["low","high","max"] with lab comment xhigh -> high; peer providers/vercel/models/deepseek/deepseek-v4.1-flash.toml is toggle + ["high","xhigh"]. toggle + ["low","high","xhigh","max"] is a hybrid seen nowhere and contradicts lab mapping. Action: Remove xhigh or cite host docs plus measured distinct xhigh vs high effect.
  • [medium] [possible mistake] providers/inferenceapis/models/deepseek-ai/DeepSeek-V4-Flash.toml:7 - Check: Do not drop lab effort levels as aliases without evidence. Why: Lab providers/deepseek/models/deepseek-flash.toml and peer providers/openrouter/models/deepseek/deepseek-v4.1-flash.toml include low in ["low","high","max"]; this file keeps only ["high","max"] on assertion low/medium behave like high. Action: Restore low or provide host validation/measurement proof that low is a no-op alias on this gateway.
  • [medium] [violation] providers/inferenceapis/models/Qwen/Qwen3.8-Flash.toml:14 - Check: Override-only files must not restate identical inherited values. Why: [limit] context = 1_000_000 is identical to models/alibaba/qwen3.8-flash.toml; deep-merge makes the block a no-op restatement. Action: Delete the [limit] table so context is inherited.
  • [medium] [violation] providers/inferenceapis/models/openai/gpt-oss-20b.toml:10 - Check: Override-only files must not restate identical inherited values. Why: [limit] context = 131_072 is identical to models/openai/gpt-oss-20b.toml (sibling gpt-oss-120b.toml in this PR correctly omits it). Action: Delete the [limit] table so context is inherited.
  • [medium] [violation] providers/inferenceapis/models/moonshotai/Kimi-K2.7-Code.toml:15 - Check: Override-only files must keep only real [modalities] deltas. Why: output = ["text"] is identical to models/moonshotai/kimi-k2.7-code.toml; only input = ["text"] is a genuine narrowing. Action: Keep input = ["text"] and delete the identical output line.
  • [medium] [violation] providers/inferenceapis/models/MiniMaxAI/MiniMax-M3.toml:2 - Check: Every toggle needs a leading top-of-file comment with the exact single wire path. Why: All six toggle files list three alternatives (reasoning_effort = "none", reasoning.enabled = false, thinking.type = "disabled") as interchangeable, so consumers cannot know which field to send. Action: Replace with the single canonical field this gateway forwards (e.g. # Toggle: reasoning_effort = none|... or # Toggle: thinking.type = enabled|disabled) on all toggle files.

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/inferenceapis/models/Qwen/Qwen3.8-Flash.toml:4 - Check: Relay reasoning baseline must copy lab + same-surface peers (AGENTS.md Reasoning options, audit skill Step 2). Why: Lab alibaba/qwen3.8-flash is toggle + effort [low,medium,xhigh] + budget_tokens max 262_144; relay peers openrouter/qwen/qwen3.8-flash and vercel/alibaba/qwen3.8-flash are toggle + budget_tokens. This file keeps only toggle, dropping effort/budget with no host evidence, while the same gateway claims reasoning_effort support for DeepSeek/GLM. Action: Add the forwarded effort/budget_tokens controls if the gateway proxies them, or cite host docs/measured behavior proving they are unavailable on this path.
  • [medium] [possible mistake] providers/inferenceapis/models/deepseek-ai/DeepSeek-V4.1-Flash.toml:7 - Check: Extra effort levels beyond lab/peers need host docs or live effect (audit skill Evidence bar). Why: Lab alias providers/deepseek/models/deepseek-v4-flash.toml and peer providers/openrouter/models/deepseek/deepseek-v4.1-flash.toml are low|high|max; this file adds xhigh (low|high|xhigh|max) supported only by a PR assertion about HTTP 400/measurement, with pricing/models URLs that do not document reasoning values. Action: Provide a direct host doc reference or measured evidence for xhigh on this host, or reduce to ["low","high","max"] to match lab/peers.
  • [medium] [violation] providers/inferenceapis/models/Qwen/Qwen3.8-Flash.toml:14 - Check: Override-only provider files must not restate identical base values. Why: [limit] context = 1_000_000 is identical to models/alibaba/qwen3.8-flash.toml (1_000_000); plain objects deep-merge so this restatement is redundant. Action: Remove the identical [limit] table and inherit context from base_model.
  • [medium] [violation] providers/inferenceapis/models/openai/gpt-oss-20b.toml:10 - Check: Override-only provider files must not restate identical base values. Why: [limit] context = 131_072 is identical to models/openai/gpt-oss-20b.toml (131_072); sibling gpt-oss-120b.toml in this PR correctly omits [limit]. Action: Remove the identical [limit] table and inherit from base_model.
  • [low] [violation] providers/inferenceapis/models/moonshotai/Kimi-K2.7-Code.toml:15 - Check: Override-only provider files must keep only real deltas. Why: output = ["text"] under [modalities] is identical to models/moonshotai/kimi-k2.7-code.toml output; only input = ["text"] is the claimed text-only delta. Action: Keep only input = ["text"] under [modalities] and inherit output.

taylordhawkes and others added 5 commits October 21, 2026 10:08
OpenAI-compatible gateway (https://api.inferenceapis.com/v1) serving nine open-weight chat models.
All models reference existing lab metadata via base_model; prices checked against
https://inferenceapis.com/pricing on 2026-09-17. bun validate passes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…API, Kimi attachment=false

Addresses review: DeepSeek V4 Flash/Pro toggle + high|max, V4.1 Flash toggle + low|high|xhigh|max,
GLM 5.3 / 5.3 Flash low|high|max, Kimi K2.7 Code attachment=false with text-only input.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…4 Pro) and add gpt-oss-20b, Qwen3.8 Flash

Prices as listed on https://inferenceapis.com/pricing on 2026-09-30.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NatZMWWFejKjLafCN9N6kU
…/ 5.15

Reverts the V4 Pro part of the previous commit; the model returned to its original host on 2026-09-30.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NatZMWWFejKjLafCN9N6kU
…ns with lab/peers

- Migrated with migrate-v2.ts; validate passes.
- DeepSeek V4 Flash / V4.1 Flash / V4 Pro: effort = low|high|max (DeepSeek's documented levels; xhigh dropped, low restored).
- Qwen3.8 Flash: toggle only, with the measurement showing effort/budget are not honoured on this path; identical [limit] removed.
- Kimi K2.7 Code: toggle kept with measured on/off evidence (reasoning_effort = none returns no reasoning field).
- gpt-oss-20b: identical [limit] removed.
- Every toggle file names reasoning_effort = "none" as the single canonical wire path.
- Rebased on dev.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NatZMWWFejKjLafCN9N6kU
@TaylorHawkes
TaylorHawkes force-pushed the add-inferenceapis-provider branch from 470168c to 8478859 Compare October 21, 2026 16:09
@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/inferenceapis/models/Qwen/Qwen3.8-Flash.toml:9 - Check: Relay reasoning baseline must copy lab + same-surface peer controls. Why: First-party providers/alibaba/models/qwen3.8-flash.toml:17 has toggle + effort ["low","medium","xhigh"] + budget {max=262144}, and same-surface relays providers/novita-ai/models/qwen/qwen3.8-flash.toml:10 (toggle+effort low|medium|xhigh+budget) and providers/openrouter/models/qwen/qwen3.8-flash.toml:11 (toggle+budget) contradict toggle-only; the file's own comment tested reasoning_effort low/high (native has no high, has medium|xhigh) and reasoning.max_tokens (native budget is thinking_budget), so the no-effect claim did not test the native wire fields. Action: Add effort = ["low","medium","xhigh"] and budget matching lab/peers if the gateway forwards reasoning_effort/thinking_budget, or provide correct-field live evidence/docs that this path strips them.
  • [medium] [possible mistake] providers/inferenceapis/models/moonshotai/Kimi-K2.7-Code.toml:12 - Check: Provider base_model overrides must be real host deltas with evidence. Why: Lab models/moonshotai/kimi-k2.7-code.toml:18-37 supports images + video and peers providers/openrouter/models/moonshotai/kimi-k2.7-code.toml:8-15 (images, structured_output=true) and providers/aihubmix/models/kimi-k2.7-code.toml:8-9 (structured_output=true, inherits multimodal) contradict this host narrowing to input=["text"] + structured_output=false based only on an uncited upstream-failure comment. Action: Verify live whether this gateway rejects image inputs and response_format json_schema/json_mode for this model and cite the error/docs, or remove the [modalities] narrowing and structured_output=false override.
  • [low] [possible mistake] providers/inferenceapis/models/meta-llama/Llama-3.3-70B-Instruct-Turbo.toml:2 - Check: Provider comments must describe this host. Why: The leading comment claims the model answers to retired Groq ids llama-3.3-70b-versatile and llama-3.1-8b-instant, which describes Groq routing, not api.inferenceapis.com, suggesting copy-paste and an unverified alias claim. Action: Remove the Groq-ids sentence or provide evidence this gateway serves those ids.

… 3.3 70B evidence

- Qwen3.8 Flash: re-measured with Alibaba's own fields (reasoning_effort low|medium|xhigh, thinking_budget), 3 runs each; none change reasoning tokens beyond noise, so the file stays toggle-only with the numbers in the header.
- Kimi K2.7 Code: image input and json_object/json_schema verified working on this host; the text-only narrowing and structured_output=false override are removed.
- Llama 3.3 70B: alias comment rewritten to describe this gateway (ids verified live).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NatZMWWFejKjLafCN9N6kU
@github-actions

Copy link
Copy Markdown
Contributor

No actionable findings.

@github-actions github-actions Bot added the reviewer: ready Automated review found no actionable items label Oct 21, 2026
@TaylorHawkes

Copy link
Copy Markdown
Contributor Author

Rebased on dev and migrated the provider to schema = 2 with migrate-v2.ts; validate and the review check are both green on the current head, with no open action items.

What changed since the last review round, with the evidence the bot asked for in each file header:

  • DeepSeek V4 Flash / V4.1 Flash / V4 Pro: effort set is now low|high|max, matching the DeepSeek lab entry (xhigh dropped, low restored); toggle kept.
  • Qwen3.8 Flash: toggle only. Re-measured live with Alibaba's own fields (reasoning_effort low/medium/xhigh and thinking_budget 64/8192), 3 runs each: reasoning tokens stay within run-to-run noise, only reasoning_effort = "none" changes anything. Identical [limit] removed.
  • Kimi K2.7 Code: toggle kept with the measured on/off result; the text-only and structured_output = false overrides are gone after verifying image input and json_object / json_schema work on this host.
  • GPT-OSS 20B: identical [limit] removed. Llama 3.3 70B: alias comment now describes this gateway (ids verified live).
  • Every toggle file names reasoning_effort = "none" as the single canonical wire path.

For context: Inference APIs is a built-in LiteLLM provider as of v1.107.0 (BerriAI/litellm#41669), using the same base URL and model ids as this PR.

@rekram1-node
rekram1-node merged commit 2d9f8ee into anomalyco:dev Nov 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewer: ready Automated review found no actionable items

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants