Commit Graph

71 Commits

Author SHA1 Message Date
Re-bin
cc04bc4dd1 fix: check gateway's supports_prompt_caching instead of always returning False 2026-02-20 15:14:45 +00:00
tercerapersona
b286457c85 add Openrouter prompt caching via cache_control 2026-02-20 11:34:50 -03:00
Re-bin
5cc019bf1a style: trim verbose comments in _sanitize_messages 2026-02-20 11:27:21 +00:00
Re-bin
0c2fea6d33 Merge branch 'main' into pr-795 2026-02-20 11:25:51 +00:00
Re-bin
82a318759f Merge branch 'main' into pr-812 2026-02-20 08:42:31 +00:00
Re-bin
9ffae47c13 refactor(litellm): remove redundant comments in cache_control methods 2026-02-20 08:21:02 +00:00
Re-bin
afa0513243 Merge branch 'main' into pr-854 2026-02-20 08:17:32 +00:00
Re-bin
73fdd0dd45 fix: complete ensure_ascii=False and UTF-8 encoding migration 2026-02-20 07:59:32 +00:00
Re-bin
37252a4226 fix: complete loguru native formatting migration across all files 2026-02-20 07:55:34 +00:00
Nikolas de Hor
53b83a38e2 fix: use loguru native formatting to prevent KeyError on messages containing curly braces
Closes #857
2026-02-19 17:19:36 -03:00
Re-bin
b11f0ce6a9 fix: prefer explicit provider prefix over keyword match to fix Codex routing 2026-02-19 17:39:44 +00:00
tercerapersona
3b4763b3f9 feat: add Anthropic prompt caching via cache_control
Inject cache_control: {"type": "ephemeral"} on the system message and
last tool definition for providers that support prompt caching. Adds
supports_prompt_caching flag to ProviderSpec (enabled for Anthropic only)
and skips caching when routing through a gateway.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 11:05:22 -03:00
PiEgg
9789307dd6 Fix Codex provider routing for GitHub Copilot models 2026-02-19 13:30:02 +08:00
Your Name
1663517998 feat: Add VolcEngine LLM provider support
- Add VolcEngine ProviderSpec entry in registry.py
- Add volcengine to ProvidersConfig class in schema.py
- Update model providers table in README.md
- Add description about VolcEngine coding plan endpoint
2026-02-19 03:02:16 +08:00
Ivan
e44f14379a fix: sanitize messages and ensure 'content' for strict LLM providers
- Strip non-standard keys like 'reasoning_content' before sending to LLM
- Always include 'content' key in assistant messages (required by StepFun)
- Add _sanitize_messages to LiteLLMProvider to prevent 400 BadRequest errors
2026-02-18 11:57:58 +03:00
Re-bin
80a5a8c983 feat: add siliconflow provider support 2026-02-18 03:52:53 +00:00
ras_bot
e5e5f02e73 merge: upstream/main into feat/add-siliconflow-provider, resolve schema conflict
- Keep siliconflow in ProvidersConfig
- Keep openai_codex and github_copilot from upstream/main

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-18 10:50:15 +08:00
Re-bin
e2a0d63909 feat: add custom provider with direct openai-compatible support 2026-02-18 02:39:15 +00:00
Darye
5033ac1759 Added Github Copilot Provider 2026-02-16 15:02:12 +01:00
Re-bin
1ce586e9f5 fix: resolve Codex provider bugs and simplify implementation 2026-02-16 11:43:36 +00:00
Re-bin
9e5f7348fe Merge branch 'main' into pr-151 2026-02-16 09:19:40 +00:00
Re-bin
49fec3684a fix: use json_repair for robust LLM response parsing 2026-02-15 08:11:33 +00:00
Zhiwei Li
66cd21e6ec feat: add SiliconFlow provider support
Add SiliconFlow (硅基流动) as an OpenAI-compatible gateway provider.
SiliconFlow hosts multiple models (Qwen, DeepSeek, etc.) via an
OpenAI-compatible API at https://api.siliconflow.cn/v1.

Changes:
- Add ProviderSpec for siliconflow in providers/registry.py
- Add siliconflow field to ProvidersConfig in config/schema.py

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-14 20:27:10 +11:00
The Mavik
10e9e0cdc9 fix(providers): clamp max_tokens to >= 1 before calling LiteLLM (#523) 2026-02-13 17:08:10 -05:00
Re-bin
b76cf05c3a feat: add custom provider and non-destructive onboard 2026-02-13 16:05:00 +00:00
qiupinhua
1ae47058d9 fix: refactor code structure for improved readability and maintainability 2026-02-13 18:51:30 +08:00
Re-bin
39dd7feb28 resolve conflicts with main and adapt MiniMax 2026-02-10 16:27:10 +00:00
Re-bin
fba5345d20 fix: pass api_key directly to litellm for more robust auth 2026-02-10 02:09:31 +00:00
pinhua33
51f97efcb8 refactor: simplify Codex URL handling by removing unnecessary function 2026-02-09 16:04:04 +08:00
pinhua33
ae908e0dcd Merge upstream/main: resolve conflicts with OAuth support 2026-02-09 15:13:11 +08:00
Xubin Ren
8af98004b3 Merge pull request #225 from chaowu2009/main
Drop unsupported parameters for providers.
2026-02-09 03:52:52 +08:00
Re-bin
eb2fbf80da fix: use config key to detect provider, prevent api_base misidentifying as vLLM 2026-02-08 19:31:25 +00:00
Re-bin
2931694eb8 fix: preserve reasoning_content in conversation history for thinking models 2026-02-08 18:37:41 +00:00
pinhua33
08efe6ad3f refactor: add OAuth support to provider registry system
- Add is_oauth and oauth_provider fields to ProviderSpec
- Update _make_provider() to use registry for OAuth provider detection
- Update get_provider() to support OAuth providers (no API key required)
- Mark OpenAI Codex as OAuth-based provider in registry

This improves the provider registry architecture to support OAuth-based
authentication flows, making it extensible for future OAuth providers.

Benefits:
- OAuth providers are now registry-driven (not hardcoded)
- Extensible design: new OAuth providers only need registry entry
- Backward compatible: existing API key providers unaffected
- Clean separation: OAuth logic centralized in registry
2026-02-08 16:48:11 +08:00
pinhua33
c1dc8d3f55 fix: integrate OpenAI Codex provider with new registry system
- Add OpenAI Codex ProviderSpec to registry.py
- Add openai_codex config field to ProvidersConfig in schema.py
- Mark Codex as OAuth-based (no API key required)
- Set appropriate default_api_base for Codex API

This integrates the Codex OAuth provider with the refactored
provider registry system introduced in upstream commit 299d8b3.
2026-02-08 16:33:46 +08:00
pinhua33
6bca38b89d Merge remote-tracking branch 'upstream/main' into feature/codex-oauth 2026-02-08 15:47:10 +08:00
Re-bin
299d8b33b3 refactor: replace provider if-elif chains with declarative registry 2026-02-08 07:29:31 +00:00
pinhua33
5bcfb550d5 Merge remote-tracking branch 'origin/main' into feature/codex-oauth 2026-02-08 13:49:25 +08:00
pinhua33
42c2d83d70 refactor: remove Codex OAuth implementation and integrate oauth-cli-kit 2026-02-08 13:41:47 +08:00
Re-bin
3b61ae4fff fix: skip provider prefix rules for vLLM/OpenRouter/AiHubMix endpoints 2026-02-08 04:29:51 +00:00
Vincent Wu
3c8eadffed feat: add MiniMax provider support via LiteLLM 2026-02-08 03:55:24 +08:00
Re-bin
572eab8237 feat: add AiHubMix provider support and refactor provider matching 2026-02-07 08:10:05 +00:00
Re-bin
9a98ab1747 Merge PR #145: fix Zhipu AI API key env var 2026-02-07 07:22:51 +00:00
Re-bin
18ec651b34 Merge PR #46: Add DashScope support 2026-02-07 02:52:40 +00:00
Re-bin
7c2aec99a0 resolve conflicts with main 2026-02-07 02:41:28 +00:00
Xubin Ren
771c918770 Merge pull request #205 from wcmolin/fix/zhipu-api-key
[Fix-204]: use correct ZAI_API_KEY for Zhipu/GLM models #204
2026-02-07 10:20:10 +08:00
cwu
d7b72c8f83 Drop unsupported parameters for providers. 2026-02-06 12:24:11 -05:00
Re-bin
2096645ff1 resolve conflicts with main 2026-02-06 16:56:02 +00:00
Re-bin
760a369004 feat: fix API key matching by model name 2026-02-06 08:01:20 +00:00
wcmolin
fea4a6bba8 fix: use correct ZAI_API_KEY for Zhipu/GLM models
LiteLLM's zai provider reads ZAI_API_KEY, not ZHIPUAI_API_KEY.
This fixes authentication errors when using Zhipu/GLM models.
2026-02-06 15:38:25 +08:00