63 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
1f49eeef80 feat(codex-auth): auto-sync model catalog with multi-source version discovery and weekly drift check (#2896) 2026-12-02 05:39:47 -05:00
游标卡尺
8b18b7a020 feat(providers): add LiteLLM as a local OpenAI-compatible provider (#2832)
* feat(providers): add LiteLLM as a local OpenAI-compatible provider

* test(web): keep LiteLLM on the generic provider-branding fallback

---------

Co-authored-by: ZQR1101 <278034003+ZQR1101@users.noreply.github.com>
2026-12-01 13:00:40 +08:00
XingyuHou
6cd25b7b71 feat(codex-auth): auto-sync model catalog with multi-source version discovery and weekly drift check 2026-11-23 20:15:28 +08:00
Henrik Bakke Dukefoss
fb187c5ca3 feat(providers): add Standard Compute as an OpenAI-compatible gateway
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 00:33:13 +01:00
Bingxi Zhao (Frank)
84de213aa2 Merge commit '81ab035e0370bd125592ecfaf7f867240081ddad' into codex/validate-reviewed-integration
# Conflicts:
#	tests/api/test_settings_router.py
2026-10-31 18:53:28 +08:00
Bingxi Zhao (Frank)
8a981afb0f Merge commit '1d21aebfbc47453592fa78fb3b787bc414ebb0b1' into codex/validate-reviewed-integration 2026-10-31 18:52:54 +08:00
Bingxi Zhao (Frank)
81ab035e03 Merge dev preserving CloudGPU and LLMTR provider integrations 2026-10-31 18:36:30 +08:00
Bingxi Zhao
aaaa7420ac Merge pull request #2156 from knowhycodata/add-llmtr-provider-dev
feat(providers): add LLMTR as an OpenAI-compatible gateway
2026-10-31 18:30:49 +08:00
Bingxi Zhao
0c9efa1860 Merge pull request #2182 from ycccccc111/fix/anthropic-haiku-5-temperature
fix: treat Claude Haiku 5 as an effort-based Anthropic family
2026-10-31 18:22:39 +08:00
Harsh
897c210076 fix(llm): drop temperature for bare o-series ids on custom endpoints 2026-10-30 21:11:52 +05:30
Antonio-Faure
b4cb6615d0 feat(providers): add xAI model coverage and Mistral embeddings/voice
- register xAI as an OpenAI-compatible Grok provider (dynamic /v1/models)\n- add Mistral embeddings (mistral-embed / codestral-embed)\n- add xAI Grok Imagine image and video generation\n- add xAI Grok Voice and Mistral Voxtral TTS/STT adapters\n- expose provider/voice hints and add mocked contract tests
2026-10-30 14:57:35 +01:00
Harsh
20d95a9bad fix(llm): leave temperature out for gpt-5 and o-series agentic calls 2026-10-30 15:56:12 +05:30
ycccccc111
2dadcc7d71 fix: treat Claude Haiku 5 as an effort-based Anthropic family
claude-haiku-5-5 rejects an explicit temperature with
"temperature: Extra inputs are not permitted", so every request (including
`deeptutor doctor --online`) failed with a 400. Add claude-haiku-5 to
ANTHROPIC_EFFORT_BASED_FAMILIES so temperature is omitted on direct and
gateway routes and effort maps to adaptive thinking, and offer the matching
none/adaptive reasoning levels in model selection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 22:16:59 -07:00
knowhy
6f63e033db feat(providers): add LLMTR as an OpenAI-compatible gateway 2026-10-29 07:48:11 +00:00
Cursor Agent
85f5d1c308 feat(providers): add CloudGPU as an OpenAI-compatible gateway
Register the CloudGPU provider spec, settings and runtime tests, and the official site icon.

Co-authored-by: CloudGPU <mrhy7176@users.noreply.github.com>
2026-10-29 00:12:41 +00:00
Bingxi Zhao (Frank)
b89748200a Merge pull request #2109: Claude Agent SDK provider 2026-10-29 01:07:23 +08:00
quocldce-sys
b16b187244 feat: add Claude Code provider backed by the Claude Agent SDK
Adds a `claude_code` LLM provider that runs turns through the local Claude
Code CLI via `claude-agent-sdk`, so DeepTutor can use the account signed in
with `claude /login` (including a Claude subscription) without an Anthropic
API key.

- One long-lived Claude Code process per DeepTutor session, mirroring the
  CodeBuddy SDK provider's owner-task pattern.
- Claude Code's built-in tools, settings, CLAUDE.md and hooks are disabled;
  DeepTutor tools are exposed through an in-process SDK MCP server and tool
  calls are returned to DeepTutor's dispatcher.
- Tool turns end via max_turns=1 and are drained instead of interrupted, so
  the transcript does not record an interrupted request.
- System messages become Claude's real system prompt.
- Optional extra: `pip install deeptutor[claude-code]`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 15:07:04 +07:00
Nirupam Bhowmick
ff28e0eb19 feat(providers): add Runcrate as an OpenAI-compatible gateway 2026-10-24 23:03:20 +01:00
Owaid0723666
bfdfb18e48 feat(providers): add onomeo as an OpenAI-compatible gateway
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 15:54:36 +09:00
Bingxi Zhao (Frank)
e49f518669 Reconcile user setup and provider changes with all reviewed PRs 2026-10-07 20:54:24 +08:00
Felix
4b6cddbe49 feat: add Opper as an LLM and embedding provider (#1786)
Opper (https://opper.ai) is an EU-hosted AI gateway: 700+ models from
50+ providers behind one OpenAI-compatible API and one key. This adds it
as a named provider. The LLM entry follows the Requesty one (#1631). The
embedding entry follows the OpenRouter one, with a default model and
dimension like the OpenAI entry.

- provider_registry.py: gateway ProviderSpec after FutureInfra. Env
  OPPER_API_KEY, base URL https://api.opper.ai/v3/compat. Base URL
  detection keys on the api.opper.ai host rather than a bare "opper"
  substring, so unrelated URLs that happen to contain it are not claimed.
- Embeddings: Opper serves OpenAI-compatible /embeddings under the same
  base URL. Registered in embedding_endpoint.py (label, default endpoint,
  /embeddings path rule), provider_runtime.py (default
  text-embedding-3-large, 3072 dims) and the GraphRAG OpenAI-compatible
  binding set.
- Tests: registry lookup and base detection, runtime resolution for the
  opper binding and for an openai binding pointed at Opper, the Settings
  LLM choice, native tool calling, the embedding runtime and the GraphRAG
  api_base translation.

Like the other recent gateway additions, it stays out of the curated
init menus, the README and the capability table. Opper model ids are
bare names (claude-sonnet-4-6, gpt-5.4-mini, text-embedding-3-large), so
the existing model-level rules for claude-, gpt-5 and gemini apply as
they are, and the text-embedding-3 rule sends dimensions=3072.

Checked: python -m py_compile on the ten changed files, git diff --check.
Not run locally: pytest, ruff and pre-commit.

Disclosure: I work at Opper.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
2026-10-07 20:50:37 +08:00
yeheboo
6431539efe feat(providers): add Y-API as an OpenAI-compatible gateway (#1791)
Adds a ProviderSpec for Y-API plus the same three assertions the other
gateway rows carry. Declares the Anthropic Messages endpoint through
api_base_by_format, so profiles on this provider can pick that wire.
2026-10-07 20:48:16 +08:00
Bingxi Zhao (Frank)
fb2065b6a9 Preserve current provider configuration and settings scroll work 2026-10-07 20:38:11 +08:00
Bingxi Zhao (Frank)
be4c144171 Merge dev while preserving futureinfra and existing provider contracts 2026-10-04 13:58:31 +08:00
Bingxi Zhao (Frank)
6a236e7b62 Merge dev to retain Requesty and API Route provider registrations 2026-10-04 13:54:09 +08:00
uxidev
cce8292ecc feat: add FutureInfra as an LLM provider
Register FutureInfra as an OpenAI-compatible gateway provider (env FUTUREINFRA_API_KEY, base URL https://futureinfra.ai/v1/ai, alias future_infra) with tests mirroring the Cheaper Inference provider.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 00:25:03 +09:00
dennyho0917
8972c8786a feat: add API Route LLM gateway provider 2026-09-30 14:01:30 +08:00
Thibault Jaigu
cf75b1047e feat: add Requesty as an LLM provider 2026-09-28 20:20:13 +01:00
aiapienthusiast
29d44d0c46 Add cheaper inference provider to registry 2026-09-23 19:15:13 +04:00
Bingxi Zhao (Frank)
880080d94f fix(llm): share Claude temperature rules across provider routes 2026-09-23 10:45:36 +08:00
Bingxi Zhao
4a614074ed Merge pull request #1343 from tggo/fix/claude-temperature-deprecated
fix(anthropic): stop sending `temperature` to Claude Sonnet 5 / Opus 4.8
2026-09-23 10:25:17 +08:00
UnificAlly
d987908b85 Add Unifically LLM provider 2026-09-20 16:02:34 +04:00
Ruslan
807a6fc2bf fix(anthropic): stop sending temperature to Claude Sonnet 5 / Opus 4.8
Anthropic rejects an explicit `temperature` on these two models with
HTTP 400 `invalid_request_error`:

    `temperature` is deprecated for this model.

Claude Haiku 4.5 still accepts it, so the limit is per model rather than
per vendor prefix, and the rule names the two affected models.

This is the same class of problem as the Kimi override directly below it
(#938): the limit belongs to the upstream API, not to the route, so it
has to fire for `binding="openai"` as well — which is how every
OpenAI-compatible gateway in front of Claude reaches these models.
Resolving it from the vendor spec makes it do that.

`test_unrelated_models_are_untouched` used `claude-sonnet-5` as its
example of an untouched model. That was true when it was written;
Anthropic deprecated the parameter afterwards. The example moves to
`claude-haiku-4-5-20251001` and `claude-3-5-sonnet`, both verified
against the live API to still accept `temperature`.
2026-09-09 22:15:36 +03:00
Bingxi Zhao (Frank)
26500eebfc fix(llm): name the Kimi k3 family once instead of per released id
#1227 is #938 again, one model id later. ``k3`` had an exact-match rule
and its own entry in the vendor-detection list; ``k3-256k`` shipped
afterwards, matched neither, and every call to it came back HTTP 400
"invalid temperature: only 1 is allowed for this model". Adding a third
literal fixes today's id and leaves the next one — ``k3-1m``,
``k3-turbo`` — to fail the same way and be reported a third time.

So state the family instead of enumerating its members.
``_matches_model_family`` is the one place that decides what ``k3``
covers (the bare id, or the id plus a dash suffix), and both callers ask
it: the request-parameter overrides, and ``find_by_model``, which is
what carries the limit when the user picked a generic OpenAI binding.
The ``=exact`` pattern kind had no other user, so it is gone rather than
left as a second way to spell almost the same thing.

The replaced test pinned ``k3-256kx`` as a non-match, which was the old
mechanism showing through rather than a behaviour anyone wants; the
short ids the rule actually has to exclude — ``sk3``, ``k30``, ``k3x``
— still do not match.
2026-09-08 01:10:36 +08:00
eunwoo song
73b6db8ec5 fix: support Moonshot k3-256k temperature override 2026-09-06 13:59:44 +09:00
Bingxi Zhao (Frank)
93df3d48b7 release: v1.6.4
Ship lighter isolated runtimes, richer Books and Mastery flows,
Reading/session polish, and explicit model API capabilities.

Release notes: assets/releases/ver1-6-4.md
2026-09-03 01:38:54 +08:00
wayblink
2ba5e3aa5d feat(llm): support explicit OpenAI wire API selection 2026-08-29 15:02:31 +08:00
XZH
3954e55b38 fix(llm): enable DeepSeek Pro native web search (#846) 2026-08-28 19:38:39 -07:00
Bingxi Zhao
e56bc10b3e Merge pull request #977 from aiheluo/fix/kimi-k3-temperature
fix(llm): drop temperature for bare Kimi model ids (k3) on the coding endpoint
2026-08-26 01:39:17 +08:00
Bingxi Zhao (Frank)
d80dee48a3 fix(llm): scope bare Kimi model overrides exactly 2026-08-26 01:28:16 +08:00
aiheluo
f30913cce8 fix(llm): drop temperature for bare Kimi model ids (k3) on the coding endpoint 2026-08-26 01:25:24 +08:00
Bingxi Zhao (Frank)
159edefaac fix(llm): make native web search terminal and model-scoped 2026-08-26 01:22:30 +08:00
宁凯
d9962666a8 feat(llm): map web_search to native Responses tools for server-side search
Providers whose Responses API performs web_search server-side (DeepSeek
V4, #846) declare the tool as {"type": "web_search"} instead of a
function schema, run the search mid-generation, and return web_search_call
output items with url_citation annotations.

- convert_tools(): map the web_search function tool to the native schema
  when the provider spec sets native_web_search
- parsing: synthesize a server_executed-marked web_search ToolCallRequest
  from web_search_call items and url_citation annotations across all three
  consumers (SSE, SDK stream, non-streaming), with tail-merge for
  annotations that stream after the search item completes
- convert_messages(): replay server-executed calls as web_search_call
  items and skip their function_call_output pairing
- assistant_message_with_tool_calls(): keep provider_specific_fields so
  the server_executed marker survives into the conversation history
- tool_dispatch: short-circuit server-executed calls with a stub result
  carrying the citations as sources — the local web_search tool never
  re-runs a search the provider already performed
2026-08-26 01:22:30 +08:00
Bingxi Zhao (Frank)
f2fac28d7b fix(llm): resolve model-intrinsic overrides from the model, not the route
Kimi models lock temperature server-side and reject any explicit value with
HTTP 400 "invalid temperature: only 1 is allowed for this model". The
moonshot spec has dropped the parameter for them since before v1.5.5, but
the lookup ran over the *configured binding's* spec, so it only fired for
someone who had picked binding="moonshot". #938 picked binding="openai" and
pointed it at Moonshot — what most people do with an OpenAI-compatible
endpoint — and kept getting the 400 two months after the fix landed.

The route is not what enforces the limit, so the route should not be what
decides. `model_overrides_for` states that once: the configured spec wins
when it says something about this model, otherwise the model's own vendor
spec answers. `find_by_model` already skipped gateway and local entries, so
it lands on the vendor whose API enforces the limit; it was simply never
consulted on this path.

This generalises past kimi — every model-intrinsic override was being lost
behind a generic gateway binding, and a spec-less config got none at all.

The override had no test, which is how it stayed half-wired. The added ones
are written as the reporter's scenario, and pin the two things that must not
break: an explicit binding still wins, and the tunable moonshot-v1-* series
(no "kimi" in the name) keeps the caller's temperature.
2026-08-21 16:22:58 +08:00
Bingxi Zhao (Frank)
f2b7828bc4 fix: correct the provider PRs merged this round
An adversarial pass over #818 / #789 / #780 after merging.

**Codex sign-ins from before this week stopped working (#789).**
``validate_runtime_profile`` compared the profile's ``codex_account_binding``
for equality, but that key is written only by ``sync_codex_catalog`` — every
managed profile published by #690/#774 has none, so ``None != <hash>`` made
each of them look like another account's and locked its owner out of Codex
until they re-ran "Refresh models". Absent now reads as legacy; a binding
that is present and different is still an account switch and still refused.

**Overriding reasoning effort for one turn returned 409 (#789).** The same
function also required the request's effort to be byte-equal to the value
stored in the catalog. Effort is a per-request knob, not part of the identity
that ties a config to a token — the check now stops at model membership.
Its test asserted the old behaviour and has been rewritten around what the
function is actually for.

**The reasoning-effort endpoint left the runtime caches stale (#789).** It
writes the catalog the runtime resolves against, like every other catalog
write in this router, but skipped ``_invalidate_runtime_caches()``.

**OrcaRouter claimed Anthropic prompt caching (#818).** ``supports_prompt_caching``
makes ``_build_kwargs`` inject ``cache_control`` blocks into any ``anthropic/*``
or ``claude*`` request — an OpenRouter extension. No other gateway sets it and
nothing established the second one accepts it; a strict gateway would 400 every
Claude turn. Also fixed ``anthropic/claude-sonnet-4.6`` in the fallback list,
which the rest of the repo spells with dashes, so a user picking it from our
own menu would have got "model not found".

**OrcaRouter inserted itself into the curated menus (#818).** The featured
lists are hand-picked and rendered as a positional numbered menu, so adding an
entry shifted Ollama from [10] to [11]. The registry entry alone already makes
a provider reachable via "Show all" and the Settings dropdown; which providers
are featured is a maintainer decision. The README paragraph goes with it — no
other provider has per-provider prose there, and it would have been translated
into ten languages.
2026-08-13 00:07:06 +08:00
Ching Wing Kwok
8297fc7b7e feat(provider): add codebuddy as a LLM provider (#780)
* feat: add codebuddy provider

* fix: treat codebuddy as login-backed provider

* feat: sync codebuddy account models

* fix: ignore no-key placeholder for codebuddy

* feat: add codebuddy web login

* fix: streamline codebuddy settings and latency

* fix: support switching codebuddy accounts

* fix: preserve codebuddy sessions and tool calls

* feat: use CodeBuddy HTTP provider over Agent SDK

Chat with CodeBuddy over plain HTTP by reusing the login state that the
IDE plugin / CLI stores on disk, instead of bundling the ~130MB Agent SDK.

- add codebuddy_http_provider (OpenAI-compatible /chat/completions on
  <endpoint>/v2) with codebuddy_credentials for local OAuth session reuse
- provider_factory picks HTTP transport whenever a login state or API key
  is available; Agent SDK stays as fallback for CLI agent features
- demote codebuddy-agent-sdk from core deps to optional codebuddy extra
- default model codebuddy/default -> codebuddy/hy3
- update auth card UX and locales for SDK-less sign-in flow

* chore: label codebuddy provider as codebuddy/workbuddy in the dashboard

* style: apply pre-commit formatting after upstream merge

* chore: capitalise codebuddy provider label as CodeBuddy/WorkBuddy

---------

Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
2026-08-13 00:02:42 +08:00
XiaoHuo888-hue
80766a420c feat: add OrcaRouter as a named OpenAI-compatible gateway provider (#818) 2026-08-12 23:38:08 +08:00
jax-novita
160f12ab24 feat(providers): add Novita AI as an LLM gateway (#746)
Registers Novita AI as an OpenAI-compatible gateway (https://api.novita.ai/openai, NOVITA_API_KEY) with base-URL detection and brand aliases.

Also teaches context-window detection about Novita's `context_size` metadata key — without it every Novita model, including the 1M-token ones, planned against the 16K-64K fallback.
2026-08-03 20:38:05 +08:00
Octopus
25c3cb34a5 fix(minimax): default to the global endpoint and record M3 context windows (#724)
MiniMax's global platform (api.minimax.io) is now the default base URL for both the OpenAI-compatible and Anthropic-compatible specs, and MiniMax-M3 / M2.7 get explicit context-window entries so planning stops falling back to a probe.

Existing profiles are unaffected — the settings UI persists base_url when the provider is selected. China-platform users must override base_url and use a China-platform key; the two platforms do not share credentials.
2026-08-03 20:31:34 +08:00
TyrionH-is-coding
c3d1dd0b15 feat(llm): add first-party OpenAI Codex OAuth provider (#690)
Replaces the oauth_cli_kit indirection with DeepTutor's own PKCE loopback
sign-in, an account-scoped live model catalog, and a Settings card that exposes
only the OAuth surface. Credentials live in `<user-root>/private/openai-codex/`
with owner-only permissions, atomic writes, and a generation guard that stops a
late refresh from resurrecting a signed-out session; `~/.codex` is never read or
modified. A CLI path shares the same service.

A Codex token authorizes one person's ChatGPT plan, so credentials anchor to the
signing-in account's own root and the managed profile is marked `owner_bound`:
`redacted_model_access` drops it for every caller, and it is not offered as an
assignable model. Signing in publishes the profile but only activates it when no
LLM is configured yet, so it never repoints a deployment that already has one.

Also from review: reschedule the status poll so one dropped response cannot
strand the card on "waiting"; defer the catalog reload when the operator has
unsaved edits instead of discarding them; log the real cause behind the generic
provider error; stop promising a retry when the token refresh actually failed;
bind both loopback stacks since `localhost` may resolve to either; and drop the
provider metadata fields nothing consumed.
2026-07-26 22:27:54 +08:00