44 Commits
Author SHA1 Message Date
Armin Ronacher f5c946480c feat(ai,coding-agent): add image input limits (closes #9631) 2026-09-20 22:59:16 +02:00
Armin Ronacher c596d09d9c feat(coding-agent): add prompt cache warming (#9668) 2026-09-19 21:18:15 +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 b03a367a4f feat(coding-agent): allow configuring Anthropic fallback models
Allow models.json overrides to replace or disable server-side fallback metadata.

Fixes #9294
2026-09-16 10:50:24 +02:00
Armin Ronacher 17de82d7be feat(ai): add GPT-6 Astra support 2026-09-04 22:08:06 +02: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
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
Duncan Ogilvie 25a2c8dcfe Add support for generic sampling parameters (#7568) 2026-08-04 00:05:29 +02:00
David Brailovsky c1019d9202 feat(ai): add Baseten provider
Closes #7405
2026-08-03 14:33:21 +02:00
Mario Zechner 2c30412420 fix(ai): support streams without finish reasons 2026-07-30 22:23:46 +02:00
Armin Ronacher 24bace27cf feat(ai): support constrained sampling (#6341)
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
Mario Zechner 6f95a33888 fix(ai): enable cache control for OpenRouter aliases
closes #6940
2026-07-22 11:46:21 +02:00
David Brailovsky f16b4e0cda add deferred tools support for kimi in openai-completions api 2026-07-16 12:26:56 +00:00
Mario Zechner cd7cad4ee2 feat(coding-agent): merge origin/main into model runtime facade 2026-07-15 12:25:36 +02:00
Petr Houška 298665cfb9 fix(ai): support OpenRouter session affinity (#6496)
Fixes #6366
2026-07-13 09:57:53 +02:00
Armin Ronacher a9ecf301fb feat(ai): add input-based pricing tiers 2026-07-09 22:44:29 +02:00
Mario Zechner fbdd46389c feat(ai): add max thinking level 2026-07-09 22:30:53 +02:00
Mario Zechner c6251a866b fix(coding-agent): apply modelOverrides to extension providers
closes #6367
2026-07-09 11:22:35 +02:00
Armin Ronacher ce6a67fc94 fix(coding-agent): allow custom providers to use stored auth
closes #5953
2026-06-23 11:52:31 +02:00
Armin Ronacher 8b97e75c6b feat(ai): add chat-template thinking compat
closes #5673
2026-06-19 23:34:17 +02:00
Armin Ronacher 9e9fc79478 fix(coding-agent): treat uppercase config values as literals
closes #5661
2026-06-13 21:24:22 +02:00
Mario Zechner 69ea1a6310 docs(coding-agent): clarify model name display docs
closes #4841
2026-06-09 14:14:57 +02:00
Mario Zechner 458a7bc27c Fix Anthropic empty thinking signature replay
closes #4464
2026-05-28 12:04:33 +02:00
Armin Ronacher 3e9f717445 fix(coding-agent): make config env references explicit
closes #5095
2026-05-28 11:58:38 +02:00
Mario Zechner d801d88a11 Support adaptive thinking for Anthropic-compatible aliases
closes #4790
2026-05-22 18:30:51 +02:00
Mario Zechner 7adb8e7634 feat(ai): add Together AI provider 2026-05-08 16:44:18 +02:00
Mario Zechner 80f06d3636 feat: add model thinking level metadata
closes #3208
2026-05-02 01:21:06 +02:00
Mario Zechner 1e33492525 fix(coding-agent): harden clipboard copy
closes #3639
2026-04-24 12:55:58 +02:00
Mario Zechner 4cd4cfd98e fix(ai): support long cache retention compat
closes #3543
2026-04-23 23:43:34 +02:00
Mario Zechner ffa0f31239 fix(ai): support Anthropic eager tool streaming compat
closes #3575
2026-04-23 23:12:45 +02:00
Mario Zechner 3054fd7a3b fix(ai,coding-agent): support anthropic-style cache control for openai compatibles closes #3392 2026-04-20 17:12:05 +02:00
Zeremonienmeister Berber Aab f05f4e8a5f Add all OpenRouter provider routing fields to OpenRouterRouting (#2904)
The OpenRouterRouting interface only had only and order, but the runtime
passes the entire object as-is to the OpenRouter API's provider field.
This means all other fields worked at runtime but had no TypeScript
type-checking, no autocomplete, and no config validation.

This adds all fields from the OpenRouter provider selection API
(https://openrouter.ai/docs/guides/routing/provider-selection):
allow_fallbacks, require_parameters, data_collection, zdr,
enforce_distillable_text, ignore, quantizations, sort, max_price,
preferred_min_throughput, preferred_max_latency.

Also fixes the models.md documentation which had an invalid fallbacks
field in the example (not part of the OpenRouter API), replaces it with
a comprehensive example showing all available fields, and clarifies that
openRouterRouting is sent as-is in the provider field.
2026-04-09 03:08:45 +02:00
Aadish VermaandMario Zechner ee2483cd34 fix: update google provider to handle gemma 4 thinking levels and route between MINIMAL and HIGH (#2903)
resolves #2812

Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-04-09 03:08:00 +02:00
Mario Zechner 7a786d88aa fix(coding-agent): resolve models.json auth per request closes #1835 2026-03-27 00:47:40 +01:00
Mario Zechner 0b48e2518f docs: clarify compat flags for openai-compatible local servers closes #2177 2026-03-15 16:11:40 +01:00
Mario Zechner 03ad7ecee7 fix(ai): add qwen-chat-template compat mode closes #2020 2026-03-14 05:20:27 +01:00
Mario Zechner bdf2419ac3 fix(coding-agent): honor provider compat in models.json closes #2062 2026-03-14 04:55:03 +01:00
Mario Zechner 3daf72d720 docs(coding-agent): clarify models.json name behavior (fixes #1840) 2026-03-05 20:16:28 +01:00
Mario Zechner 76a6a74517 feat(coding-agent): merge custom models with built-ins by id 2026-02-06 19:15:26 +01:00
Mario Zechner 2f1ab3641f fix(coding-agent): document modelOverrides and harden override merging fixes #1062 2026-02-06 18:54:29 +01:00
Mario Zechner 8306b3bc20 docs(coding-agent): improve models.md with minimal example and defaults
- Add minimal example showing only required fields for local models
- Rename 'Basic Example' to 'Full Example' showing all fields
- Add 'Default' column to model configuration table
- Clarify that apiKey is required but ignored by Ollama
2026-02-01 17:51:24 +01:00
Ben Vargas e045a9f142 feat(ai): add Vercel AI Gateway routing support (#1051)
* feat(ai): add Vercel AI Gateway routing support

Add vercelGatewayRouting to OpenAICompletionsCompat, parallel to
openRouterRouting. When a model targets ai-gateway.vercel.sh and has
vercelGatewayRouting configured, the openai-completions provider passes
providerOptions.gateway with only/order in the request body.

Changes:
- types.ts: VercelGatewayRouting interface + field on OpenAICompletionsCompat
- openai-completions.ts: buildParams passes providerOptions.gateway,
  detectCompat/getCompat include the new field
- model-registry.ts: VercelGatewayRoutingSchema for models.json validation
- test: updated Required<OpenAICompletionsCompat> in test fixture

* docs(coding-agent): add vercelGatewayRouting to custom models documentation
2026-01-30 01:44:51 +01:00
Mario Zechner fa8b26a184 docs: update changelog guidance and links 2026-01-26 15:45:51 +01:00
Mario Zechner 98a1e7b86b docs(coding-agent): add models.md for custom providers and models 2026-01-26 00:11:10 +01:00