Commit graph

305 commits

Author SHA1 Message Date
Armin Ronacher
c71a496ff9
feat(coding-agent): add Nix flake (#9137)
Add a Nix flake that builds Pi from the checkout on aarch64/x86_64 Linux
and macOS. The build is offline: provider model data is hydrated from a
pi.dev model catalog revision pinned in nix/model-catalog.json, and the
runtime dependency tree comes from packages/coding-agent/install-lock with
internal packages built from source.

The Nix workflow keeps the catalog pin current on main, builds release
tags on all systems, and fast-forwards the stable branch to each release
that builds. The release script refreshes the pin before tagging.
2026-10-02 18:30:51 +02:00
David Brailovsky
4665fafb4d fix(ai): keep models.dev pricing tiers for Amazon Bedrock models
Bedrock OpenAI models were costed at the short-context rate above 272k
input tokens because the generator dropped the models.dev tiers.

closes #10326
2026-10-02 18:25:43 +02:00
Nathan Disidore
4812cb268e
feat(ai): add Cloudflare Clef classifiers to Workers AI (#10316)
builds on https://github.com/earendil-works/pi/pull/10322 by @RealAlexandreAI
2026-10-02 16:52:58 +02:00
David Brailovsky
c10bfb0d79 fix(ai): use dashed Claude model IDs for Cloudflare AI Gateway
The gateway's /anthropic passthrough forwards the model ID to Anthropic
unchanged. models.dev lists the gateway's Claude models with dotted
versions (claude-opus-5.5), which Anthropic rejects with a 404. Convert
dots to dashes (claude-opus-5-5) when generating the catalog.
2026-10-02 16:12:00 +02:00
Carlos Villela
28eaccb8e8
fix(ai): update Together DeepSeek V4 Pro model ID (#10336) 2026-10-02 10:18:11 +02:00
Armin Ronacher
12c416e1a6 feat(ai,coding-agent): add GPT-6.1 Sol and make it the Codex default
Add gpt-6.1-sol to the OpenAI, Azure OpenAI Responses, and OpenAI Codex
providers with official pricing ($2 input, $0.10 cached input, $2.50
cache writes, $10 output, long-context tier above 272k). The model
rejects reasoning.effort "none", so off is unsupported and clamps to
the lowest effort.
2026-09-29 19:43:27 +02:00
Armin Ronacher
89a5c7bdaa feat(ai): report token usage and cost for System One classify results
System One services (TypeSafe, OpenRouter, OpenCode Zen, Cloudflare Workers AI) return usage.input_tokens/output_tokens. ClassifierResult now carries usage priced from the model catalog like chat usage.
2026-09-29 16:08:22 +02:00
Armin Ronacher
33e2033543 feat(ai): expose Jev on Vercel AI Gateway and OpenCode Zen
Vercel evaluation models are generated from the AI Gateway catalog and
routed through its TypeSafe-compatible /typesafe/v1/systemone endpoint.
OpenCode Zen's jev-1.13 and jev-1.13-free are routed through
/zen/v1/systemone.
2026-09-29 15:32:10 +02:00
Armin Ronacher
c90d9ea586 feat(ai,coding-agent): add Claude Sonnet 5.5 support 2026-09-28 20:46:38 +02:00
David Brailovsky
c1449660c8 fix(ai): allow empty thinking signatures for OpenCode qwen3.8-flash
fixes #10047
2026-09-28 14:55:08 +02:00
David Brailovsky
dc84c1ac0a fix(ai): send requested thinking level to Mistral reasoning models
Mistral models with effort levels now use reasoning_effort based on
their thinking level map from models.dev instead of a hardcoded id list.
GLM 5.3 no longer gets prompt_mode, GLM 5.2 can use max, and off sends
the model's off value when it has one.

fixes #9678
2026-09-28 14:33:10 +02:00
Armin Ronacher
a7d17e39aa feat(ai): serve Jev classifier through OpenRouter and Cloudflare Workers AI
OpenRouter decision models use its TypeSafe-compatible /api/v1/systemone endpoint. Cloudflare Workers AI gets a cloudflare-workers-ai-system-one classifier API for the /ai/run envelope. Request and answer parsing is shared in system-one-shared.ts.
2026-09-24 12:34:58 +02:00
Armin Ronacher
a328aa89ad
feat(ai,coding-agent): unify image and classifier model infrastructure (#9948) 2026-09-23 17:41:19 +02:00
Armin Ronacher
fde38ed7c2 fix(ai): stabilize Copilot Claude Opus 5.5 effort levels 2026-09-23 11:41:33 +02:00
Armin Ronacher
b7f4b05c7f fix(ai): stabilize Claude Opus 5.5 effort levels 2026-09-22 21:26:09 +02:00
Armin Ronacher
27c072e98f feat(ai,coding-agent): add new Copilot models 2026-09-22 21:14:13 +02:00
Armin Ronacher
db91e03319 feat(ai,coding-agent): add GPT-6 Sol and Luna support 2026-09-22 20:57:04 +02:00
Armin Ronacher
b4588f26af feat(ai,coding-agent): add Claude Opus 5.5 support 2026-09-22 18:46:17 +02:00
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