* 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>
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>
Register the CloudGPU provider spec, settings and runtime tests, and the official site icon.
Co-authored-by: CloudGPU <mrhy7176@users.noreply.github.com>
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>
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>
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.
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>
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`.
#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.
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
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
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.
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.
* 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>
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.
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.
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.