Commit graph

262 commits

Author SHA1 Message Date
Cristina Poncela Cubeiro
eb1f87fa9a
fix(coding-agent/ai): anthropic refusal error and fallbacks (#8258) 2026-08-17 20:04:49 +02:00
David Brailovsky
6db110e6fa fix(ai): add Qwen Token Plan Individual DeepSeek V4 Pro 0813
Add deepseek-v4-pro-0813 to the Qwen Token Plan Individual allowlist and generated catalog. Fixes #8194.
2026-08-17 16:58:39 +02:00
David Brailovsky
87205484bf fix(ai): use Chinese ZAI Coding Plan catalog
Generate zai-coding-cn models from the matching zhipuai-coding-plan catalog and use available ZAI PAYG prices for usage estimates.

Fixes #8220
2026-08-17 16:24:31 +02:00
Vegard Stikbakke
0e4d495414 fix(ai,coding-agent): remove deprecated Xiaomi models
closes #8187
2026-08-17 14:43:48 +02:00
Poison
86d001d36b
fix(ai): expose low thinking level for DeepSeek V4 Flash on opencode/opencode-go (#8181)
DEEPSEEK_V4_FLASH_THINKING_LEVEL_MAP (which enables the low effort level)
was only applied to deepseek/deepseek-v4-flash, so the same model served
through opencode and opencode-go only offered off/high/max. models.dev
reports reasoning_options effort values of low/high/max for these
providers, and the live opencode-go API accepts reasoning_effort=low
(verified against https://opencode.ai/zen/go/v1).

Apply the flash map to every deepseek-v4-flash variant on the deepseek,
opencode, and opencode-go providers. qwen-token-plan is left unchanged
since its gateway support for the low effort level is not verified.
2026-08-17 10:41:39 +02:00
Milosz Jankiewicz
70e878d4cf
feat(ai): route xAI models through Responses and default to Grok 4.6 (#8124)
* feat(ai): route xAI models through Responses and default to Grok 4.6

Send built-in xAI catalog models through the Responses API with
store: false and include reasoning.encrypted_content so encrypted
reasoning is requested and replayed, including future models.dev
additions. Thinking levels come from models.dev reasoning_options
(grok-4.6 exposes xhigh); models without verified options
(grok-build-0.1) keep reasoning always on and never send unsupported
"none"/"minimal" efforts. Narrow the xAI provider to the Responses API,
send pi's runtime User-Agent on xAI requests for provider-side
attribution, and make Grok 4.6 the default xAI model.

* fix(ai): drop duplicate xAI encrypted-reasoning tests

Azure already covers the shared replay path; keep the xAI-specific include-without-effort case next to the existing request tests.

---------

Co-authored-by: Jaaneek <Jaaneek@users.noreply.github.com>
2026-08-16 17:47:38 +02:00
David Brailovsky
9d2ec7ffab fix(ai): use pi user agent for Kimi Coding requests
Some checks are pending
CI / build-check-test (push) Waiting to run
2026-08-13 22:26:38 +02:00
Michael Yu
2f8b4b42fe
fix(ai): expose low reasoning effort for native DeepSeek V4 Flash (#7807) 2026-08-11 11:15:11 +02:00
初心Yearth
b647d18793
fix(ai): detect DeepSeek base URLs case-insensitively (#7933) 2026-08-11 10:49:19 +02:00
muyiyr
75c7fd6623
fix(ai): declare Cloudflare Responses strict tools (#7934)
Fixes #7896
2026-08-11 09:07:12 +02:00
David Brailovsky
c185d41238 fix(ai): send max_tokens to DeepSeek APIs
Auto-detect DeepSeek in generated and runtime compatibility metadata so built-in and custom models use the supported token limit field.
2026-08-08 18:42:07 +02:00
Armin Ronacher
e47b8e37a6 feat(ai): use additional_tools for deferred tools
Some checks are pending
CI / build-check-test (push) Waiting to run
closes #7709
2026-08-07 23:05:23 +02:00
Mehmet Aras
c03d78bdce
feat(ai): add Qwen Token Plan Individual provider (#7659)
Some checks are pending
CI / build-check-test (push) Waiting to run
2026-08-06 17:18:02 +02:00
David Brailovsky
b9497c8c1f fix(ai): correct Fireworks GLM prompt caching, closes #7676 2026-08-06 11:30:30 +02:00
Mario Zechner
6b461b75b3 feat: extract telemetry package
Some checks are pending
CI / build-check-test (push) Waiting to run
2026-08-05 23:23:12 +02:00
QuintinShaw
2f7f75a20e
fix(ai): replace qwen3.8-max-preview with qwen3.8-max on token plan (#7670)
GA qwen3.8-max is on models.dev for alibaba-token-plan[-cn]. Point the
Qwen3.8 effort map at the GA id and exclude the retired preview so
regenerate does not revive it.
2026-08-05 22:16:20 +02:00
Mario Zechner
04d6447f7c feat: add typed telemetry contracts 2026-08-05 22:03:33 +02:00
Armin Ronacher
71f6c25c36 fix(ai): update Groq Qwen reasoning override 2026-08-04 21:24:56 +02:00
Vegard Stikbakke
720f0e8eeb fix(ai): route Copilot Grok 4.5 through Responses, closes #7560 2026-08-04 12:42:01 +02:00
David Brailovsky
c1019d9202 feat(ai): add Baseten provider
Closes #7405
2026-08-03 14:33:21 +02:00
David Brailovsky
a688e257c5 fix(ai): route Fireworks Kimi K3 through OpenAI compatibility
closes #7199

Co-authored-by: Fedir Skitsko <fedya@skitsko.com>
2026-07-31 12:47:07 +02:00
Mario Zechner
2c30412420 fix(ai): support streams without finish reasons 2026-07-30 22:23:46 +02:00
Armin Ronacher
b889a0ce3d fix(ai): update GPT-5.6 pricing 2026-07-30 21:02:58 +02:00
David Brailovsky
4c1a0b92e5 fix(ai): use Qwen thinking controls for token plan reasoning models
fixes #6998 #6951
2026-07-29 14:58:48 +00:00
HyeokjaeLee
2fe21b407f
fix(ai): send max_tokens for Z.AI providers (#7174)
* fix(ai): send max_tokens for Z.AI providers

Z.AI (zai, zai-coding-cn, api.z.ai, open.bigmodel.cn) ignores
max_completion_tokens and only honors max_tokens, so the configured
output cap never applied and Z.AI fell back to its 65536 default.
Add isZai to detectCompat's useMaxTokens condition.

* fix(ai): set zai max_tokens compat in model generator

Per review feedback: the model generator now maps Z.AI to max_tokens, so
regenerated Z.AI model entries carry compat.maxTokensField="max_tokens"
(Z.AI ignores max_completion_tokens). The runtime detectCompat change is
kept as a fallback for custom/self-hosted Z.AI base URLs not in the catalog,
matching how moonshot/together/nvidia are handled in both places.
2026-07-28 14:43:41 +02:00
Jack Rose
60f6a8034d
feat(ai): add GitHub Copilot Claude Opus 5 support (#7158)
Route claude-opus-5 through the Anthropic Messages API with adaptive
thinking, the Copilot minimal thinking-level override, and pin the
extended 1M context window alongside the other Copilot Opus models.
2026-07-27 11:52:19 +02:00
Burak Varlı
af3b934fa6
feat(ai): support Claude Opus 5 on Bedrock (#7081) 2026-07-25 08:25:23 +02:00
David Brailovsky
921c354352
add opus-5 models settings (#7083) 2026-07-24 20:57:46 +02:00
Armin Ronacher
24bace27cf
feat(ai): support constrained sampling (#6341)
Some checks are pending
CI / build-check-test (push) Waiting to run
Add the constrained sampling API and provider plumbing for OpenAI and Anthropic tool calls, including grammar sampling variants and model capability metadata.
2026-07-23 23:48:40 +02:00
Thomas Mustier
241431c69b
fix(agent,ai): don't cache write compaction or branch summaries (#6618)
avoid cache writes for compaction and branch summaries

Co-authored-by: Armin Ronacher <armin.ronacher@active-4.com>
2026-07-23 23:03:23 +02:00
David Brailovsky
bc3d364742 fix bundled models generation time
Fresh package installs could give bundled model catalog
files newer filesystem mtimes than the remote catalog’s Last-Modified timestamp,
causing Pi to ignore newer remote models.
Use the catalog’s recorded generation time instead of installation-dependent file metadata.
2026-07-23 13:34:51 +00:00
Armin Ronacher
5dc40fee33 feat(ai): derive generated model types from JSON 2026-07-22 13:13:36 +02:00
Mario Zechner
6f95a33888 fix(ai): enable cache control for OpenRouter aliases
closes #6940
2026-07-22 11:46:21 +02:00
David Brailovsky
1ae064099c
generate-models: use reasoning options from models.dev (#6928)
* generate-models: use reasoning options from models.dev

* fix tests
2026-07-22 08:33:34 +02:00
David Brailovsky
959cc1897e fix moonshot/kimi3 compat properties
Some checks are pending
CI / build-check-test (push) Waiting to run
2026-07-21 16:49:36 +02:00
Armin Ronacher
c8c3cd499f fix(ai): validate generated model data before builds
Some checks are pending
CI / build-check-test (push) Waiting to run
2026-07-20 22:29:06 +02:00
Mario Zechner
13437ca828 fix(ai): normalize Kimi K2.7 to the canonical coding model
Treat the models.dev k2p7 entry as an alias for kimi-for-coding and regenerate provider catalogs. This restores consistency between generated model types and values and unblocks repository type checks.
2026-07-20 14:04:21 +02:00
QuintinShaw
bbb91fa8ae
feat(ai): add Qwen Token Plan as built-in provider (#6858)
Add Alibaba Cloud Model Studio Token Plan subscription service as two
built-in API-key providers: qwen-token-plan (international, Singapore)
and qwen-token-plan-cn (China, Beijing).

Each provider exposes 15 text-generation models (Qwen, DeepSeek, GLM,
Kimi, MiniMax) via the OpenAI-compatible endpoint with DashScope
enable_thinking support. Model metadata is sourced from models.dev;
qwen3.8-max-preview is hardcoded until models.dev includes it.

Also fixes kimi-coding test references (k2p7 -> kimi-for-coding) after
models.dev catalog update picked up by generate-models.

Closes #6850
2026-07-20 13:53:30 +02:00
Aadish Verma
35f12c8c72
fix: gpt 5.6 context window (#6853) 2026-07-20 12:22:22 +02:00
David Brailovsky
8b93737078 kimi: add low,high to k3 and remove k2p7 references 2026-07-20 09:00:15 +00:00
David Brailovsky
ce48d9b4ef fix(ai): preserve GitHub Copilot long-context pricing tiers, closes #6668 2026-07-17 12:38:12 +02:00
Armin Ronacher
a9f6a3159a
feat(ai): separate generated model data (#6765) 2026-07-17 11:08:48 +02:00
Armin Ronacher
8881e17625 fix(ai): show implied Kimi Coding subscription costs 2026-07-17 10:01:22 +02:00
Armin Ronacher
b8575f60fa fix(ai): use adaptive thinking for Kimi Coding
Some checks are pending
CI / build-check-test (push) Waiting to run
2026-07-16 20:59:54 +02:00
Armin Ronacher
aba324504c fix(ai): correct Kimi K3 Moonshot pricing 2026-07-16 20:37:48 +02:00
Armin Ronacher
c1b7856e26 fix(ai): prevent removed xAI models regenerating, closes #6736 2026-07-16 20:07:36 +02:00
Armin Ronacher
78ff249436 fix(ai): expose max thinking for Kimi Coding K3
Closes #6737
2026-07-16 19:58:17 +02:00
Armin Ronacher
c2c32febb0 fix(ai): correct Kimi K3 gateway output limits 2026-07-16 18:56:54 +02:00
David Brailovsky
70c5763297 add deferred tool loading for kimi-k3 2026-07-16 15:39:22 +00:00
David Brailovsky
3524cd4c85 Merge remote-tracking branch 'origin/main' into add-kimi-deferred-tools 2026-07-16 17:30:50 +02:00