Commit graph

298 commits

Author SHA1 Message Date
Armin Ronacher
1a584a7a56 feat(ai,coding-agent): add Grok 4.7 support 2026-09-22 00:07:34 +02:00
Armin Ronacher
890f920884 fix(ai): default unknown providers to non-strict tools (closes #9816) 2026-09-21 01:14:53 +02:00
Armin Ronacher
f5c946480c feat(ai,coding-agent): add image input limits (closes #9631) 2026-09-20 22:59:16 +02:00
EdenGottlieb
af7359b904
fix(ai): exclude Cerebras from supportsStrictMode (#9804)
Make strict mode as unsupported in cerebras, as mixed strict/unstrict tool usage doesn't work (400 from API), and extensions may define both strict and unstrict tools
2026-09-20 12:52:18 +02:00
Alexey Zaytsev
b73412a378
feat(ai,coding-agent): add Meta provider with Muse subscription OAuth (#9096)
Device authorization flow against auth.meta.com mints a Model API key via the Muse Code key-mint endpoint. Identity token stored as refresh, minted key as access; daily re-mint via the standard OAuth scheduler. Identity is non-renewable (no refresh grant), so mint 401/403 directs to /login meta. Models sourced from models.dev; default muse-spark-1.3.
2026-09-20 11:13:43 +02:00
Armin Ronacher
c596d09d9c
feat(coding-agent): add prompt cache warming (#9668) 2026-09-19 21:18:15 +02:00
Armin Ronacher
4d38031fbd feat(ai): ship Radius model catalog 2026-09-19 19:23:31 +02:00
David Brailovsky
e4ce7b449f fix(ai): update Kimi model catalog source 2026-09-18 16:04:16 +02:00
Vegard Stikbakke
bb0f4aa602 fix(ai): preserve DeepSeek V4 effort metadata
closes #9485
2026-09-18 10:43:20 +02:00
David Brailovsky
3955b27a1d fix(ai): preserve Vercel AI Gateway unsigned thinking
Enable empty-signature thinking replay for all generated Vercel AI Gateway models.

closes #9676
2026-09-17 16:43:24 +02:00
David Brailovsky
aa50fe778a fix(ai): derive Google thinking levels from models.dev
Extract Google catalog processing and apply models.dev reasoning effort
metadata directly for Google, Vertex, and OpenCode models. Keep the
provider-specific Gemma 4 toggle mapping.
2026-09-16 17:49:44 +02:00
Armin Ronacher
9e05370b29
Mid conversation system messages (#9548)
This change makes system prompt text and tool changes part of the transcript rather than silently rewriting its starting conditions. This lets Pi record when instructions changed or tools became available, restore that state after resuming or navigating branches, and preserve cached prompt prefixes where the upstream supports it.
2026-09-16 15:54:07 +02:00
David Brailovsky
6671c60476 fix(ai): send Baseten session affinity headers
Enable session affinity for cataloged Baseten models so related requests reach the same replica and benefit from prompt caching.

Closes #9629
2026-09-16 12:11:16 +02:00
Vegard Stikbakke
d92eb8d4b1 feat(ai): enable Fireworks Messages deferred tool loading 2026-09-10 21:18:35 +02:00
David Brailovsky
2e6fe2f988 fix(ai): remove retired GPT-5.4 Codex models
Remove GPT-5.4 and GPT-5.4 mini from the OpenAI Codex catalog and update affected tests.

Fixes #9394
2026-09-10 14:25:55 +02:00
David Brailovsky
12f59336af fix(ai): update DeepSeek Flash catalog
Replace retired Flash aliases with the canonical deepseek-flash model and refresh DeepSeek pricing metadata.

Closes #9423
2026-09-10 14:14:19 +02:00
David Brailovsky
bbb61e34aa fix(ai): send OpenRouter session affinity headers by default
Send x-session-id for OpenRouter Chat Completions and Anthropic Messages requests while preserving explicit opt-out and cache-disabled behavior.

closes #9102
2026-09-10 10:37:44 +02:00
Vegard Stikbakke
6b94ae2ece fix(ai): preserve Fireworks thinking and native effort levels
Enable unsigned thinking replay and metadata-driven adaptive effort for Fireworks Messages models, with verified fallbacks for incomplete catalog metadata. Remove redundant GLM 5.2 and Kimi K3 effort aliases and add regression tests.

closes #9323
2026-09-10 09:51:31 +02:00
Petr Houška
7d8ab31a47
fix(ai): route Copilot GPT models through Responses (#9253)
Fixes #9209
2026-09-07 13:01:50 +02:00
Armin Ronacher
17de82d7be feat(ai): add GPT-6 Astra support 2026-09-04 22:08:06 +02:00
Milosz Jankiewicz
0dbf2b76fe
fix(ai): remove Grok Build 0.1 from built-in xAI model catalog (#9093)
Add grok-build-0.1 to XAI_BUILTIN_EXCLUDED_MODEL_IDS so the generated xAI
catalog only lists grok-4.3, grok-4.5 and grok-4.6. Update the exclusion
test and drop the thinking-level assertion for the removed model.

Co-authored-by: Jaaneek <Jaaneek@users.noreply.github.com>
2026-09-04 10:18:26 +02:00
David Brailovsky
265a33393e fix(ai): add Qwen3.8 Flash to individual token plan
Derive Token Plan reasoning effort levels directly from models.dev metadata, retaining fallbacks for GLM-5 and GLM-5.1.

fixes #9021
2026-09-03 12:34:53 +02:00
Panoplos
22940a62f5
fix(ai): keep Baseten GLM-5.2 text-only (#8293) 2026-09-03 11:10:33 +02:00
David Brailovsky
8c08d0645a Merge remote-tracking branch 'origin/main' into dev 2026-09-03 07:58:51 +00:00
Mario Zechner
4e69b0c280 feat(ai): preserve Anthropic per-turn thinking effort
Route eligible OpenRouter Claude models through the native Messages API and surface provider thinking-drop diagnostics.
2026-09-02 21:39:29 +02:00
David Brailovsky
1e4fbe3847 fix(ai): use completions API for all Fireworks GLM models
Route every GLM model through the OpenAI-compatible completions API.

Closes #8978
2026-09-02 14:34:16 +02:00
David Brailovsky
69afa10503 fix(ai): route GitHub Copilot Fable 5 through Anthropic Messages
closes #8961
2026-09-02 14:22:56 +02:00
Cristina Poncela Cubeiro
758a0ee9b7 Merge branch 'main' into dev
# Conflicts:
#	packages/agent/CHANGELOG.md
#	packages/ai/scripts/generate-models.ts
#	packages/ai/src/providers/cloudflare-ai-gateway.ts
#	packages/ai/test/zai-coding-plan-models.test.ts
#	packages/coding-agent/src/modes/interactive/interactive-mode.ts
#	packages/tui/src/tui-alt-screen.ts
2026-08-28 13:19:43 +02:00
Mario Zechner
7ddbac2823 fix(ai): keep cloudflare ai gateway workers-ai models when models.dev drops them
models.dev's cloudflare-ai-gateway catalog no longer lists workers-ai/*
entries, which removed every openai-completions model from the generated
gateway catalog and narrowed the inferred provider api union. Derive the
gateway's workers-ai models from the cloudflare-workers-ai catalog and pin
the provider's api generic. Also move the zai glm-5.3 cost assertion, now
that models.dev prices it in the zai API catalog.
2026-08-25 16:52:29 +02:00
Cristina Poncela Cubeiro
587be985a0 feat(ai): add deepseek-v4-flash-vision-exp 2026-08-25 13:57:20 +02:00
David Brailovsky
650e7a6126
fix(ai): derive OpenRouter reasoning controls (#8614)
Fixes #8454

Co-authored-by: Petr Houška <houskape@gmail.com>
2026-08-25 12:11:21 +02:00
Cristina Poncela Cubeiro
e8c632ef64 fix(ai): cloudflare gateway type, include workers
Fixes https://github.com/earendil-works/pi/actions/runs/32825925694/job/97733792662?pr=8605 build error
2026-08-25 11:03:13 +02:00
David Brailovsky
3de00332f7 fix(ai): derive Z.AI reasoning effort metadata
Use models.dev effort options for Z.AI models while preserving GLM-5.2's none effort. Expose GLM-5.3's low, high, and max levels.

closes #8336
2026-08-19 13:19:52 +02:00
Cristina Poncela Cubeiro
ed867e9094
fix(ai): fallback cost not via stream options (#8352)
* fix(ai): fallback cost not via stream options

* fix: always pass beta header, remove fallback from stream options
2026-08-19 11:30:26 +02:00
Cristina Poncela Cubeiro
4809c2abca
fix(ai): anthropic fallback usage (#8319)
* fix: anthropic fallback usage

* small cleanup
2026-08-19 09:11:45 +02:00
Ben
b237412699
feat(ai): generalize openai-completions thinking token budget fields (#8275)
#7638 hardcoded vLLM's thinking_token_budget. Map thinkingBudgets through
thinkingTokenBudgetField, keep the boolean as a vLLM alias, clamp so the
answer keeps 1024 tokens, and document it.

fixes #8274

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-08-18 16:35:35 +02:00
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 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
closes #7709
2026-08-07 23:05:23 +02:00
Mehmet Aras
c03d78bdce
feat(ai): add Qwen Token Plan Individual provider (#7659) 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