Commit Graph

341 Commits

Author SHA1 Message Date
Johannes Ebeling
779d0ef39d feat(ai): add Mistral Medium 3.5 model (#4009) 2026-04-30 12:18:17 +02:00
Mario Zechner
c1dd6082ee fix(ai): apply DeepSeek V4 reasoning compat
closes #3940
2026-04-29 23:25:03 +02:00
Mario Zechner
84b3aa5efc Updated model defs 2026-04-29 22:58:56 +02:00
Mario Zechner
ae81deb4c3 fix(ai): correct DeepSeek V4 pricing metadata
closes #3910
2026-04-29 22:58:19 +02:00
Mario Zechner
fe1381389d Add [Unreleased] section for next cycle 2026-04-28 19:34:40 +02:00
Mario Zechner
fbb5eed191 fix: honor telemetry for Cloudflare attribution headers 2026-04-27 23:49:14 +02:00
MC
d6e08b3da0 feat(ai): add Cloudflare Workers AI as a provider (#3851)
* feat(ai): add Cloudflare Workers AI as a provider

Cloudflare Workers AI hosts open-weight LLMs (Kimi K2.6, GPT-OSS,
GLM-4.7, Llama 4, Gemma 4, Nemotron 3) on Cloudflare's GPU network with
an OpenAI-compatible endpoint. Reuses the openai-completions API
protocol; the per-account URL contains a {CLOUDFLARE_ACCOUNT_ID}
placeholder resolved at request time by a small helper.

Pi automatically sets x-session-affinity for prefix caching:
https://developers.cloudflare.com/workers-ai/features/prompt-caching/

Auth: CLOUDFLARE_API_KEY (matches pi's *_API_KEY convention) +
CLOUDFLARE_ACCOUNT_ID. The User-Agent identifies traffic as
'pi-coding-agent' in Cloudflare analytics.

Verified end-to-end against a real Cloudflare account: 17 e2e tests
pass across stream/empty/tokens/unicode/tool-call-without-result/
total-tokens against @cf/moonshotai/kimi-k2.6.

Cloudflare AI Gateway is a separate, larger change (it requires routing
through provider-specific subpaths with the matching API protocol per
upstream) and will land in a follow-up PR.

* refactor(ai): move Cloudflare User-Agent and session-affinity flag to per-model metadata

Instead of conditionally setting them in openai-completions.ts based on
provider detection, declare them as model-level fields in the catalog
(headers + compat). This is consistent with how the github-copilot and
kimi-coding entries already declare their static headers.

  packages/ai/scripts/generate-models.ts: emit headers and compat fields
  on each cloudflare-workers-ai entry (CLOUDFLARE_STATIC_HEADERS).
  packages/ai/src/providers/openai-completions.ts: drop the
  isCloudflareProvider conditional that injected User-Agent and the
  isCloudflareWorkersAI override of sendSessionAffinityHeaders.
  packages/ai/src/models.generated.ts: re-spliced 8 cloudflare-workers-ai
  entries with headers + compat.

Behavior is unchanged - verified via fetch interceptor that User-Agent
and x-session-affinity / session_id / x-client-request-id are still sent
on outbound requests. 5/5 e2e tests pass.
2026-04-27 23:41:54 +02:00
Mario Zechner
2dd6399b71 Add [Unreleased] section for next cycle 2026-04-27 21:45:48 +02:00
Mario Zechner
bd55c7a728 Add [Unreleased] section for next cycle 2026-04-27 21:29:40 +02:00
Mario Zechner
65fc803671 fix(ai): refresh generated model catalog for release 2026-04-27 21:28:21 +02:00
Mario Zechner
9b103e5e41 fix(ai): replay DeepSeek V4 reasoning content
closes #3668
2026-04-24 19:32:51 +02:00
Mario Zechner
6160892626 Add [Unreleased] section for next cycle 2026-04-24 14:20:18 +02:00
Mario Zechner
1e33492525 fix(coding-agent): harden clipboard copy
closes #3639
2026-04-24 12:55:58 +02:00
Mario Zechner
c96c2fcd1e fix(ai): correct gpt-5.5 context metadata 2026-04-24 10:42:44 +02:00
Mario Zechner
0fce64d425 Add [Unreleased] section for next cycle 2026-04-24 01:01:39 +02:00
Mario Zechner
2926f7e887 chore: update generated models 2026-04-24 00:55:27 +02:00
Markus Ylisiurunen
ba8f1c228a Align GPT-5.5 Codex capability handling (#3618)
* fix(ai): align gpt-5.5 codex capabilities

* chore(ai): update generated models

* fix(ai): apply gpt-5.5 priority pricing to api

---------

Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-04-23 23:49:33 +02:00
Mario Zechner
1312346199 fix(ai): expand Copilot eager streaming compat
closes #3575
2026-04-23 23:43:00 +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
f70d041e71 feat(ai): add GPT-5.5 Codex model 2026-04-23 21:36:16 +02:00
Mario Zechner
f0ebb327f2 fix(ai): set default Kimi Coding user agent closes #3586 2026-04-23 12:12:54 +02:00
Mario Zechner
876a197b19 Add [Unreleased] section for next cycle 2026-04-22 21:38:11 +02:00
Mario Zechner
3dacaa8ed9 fix(coding-agent,tui): drop typebox compiler shim and fix progress 2026-04-22 21:12:20 +02:00
Mario Zechner
6553141f69 fix(ai): add gemini 3.1 flash lite cloud code assist model
closes #3545
2026-04-22 19:13:51 +02:00
Mario Zechner
9f91276a42 Add [Unreleased] section for next cycle 2026-04-22 02:15:04 +02:00
Mario Zechner
0bb0a58466 feat(ai): add Fireworks provider support closes #3519 2026-04-22 01:09:11 +02:00
Mario Zechner
a0a16c7762 fix(amazon-bedrock): restore regional endpoint resolution
closes #3481
closes #3485
closes #3486
closes #3487
closes #3488
2026-04-21 13:20:10 +02:00
Mario Zechner
19013265a8 Add [Unreleased] section for next cycle 2026-04-20 23:55:47 +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
Mario Zechner
00887125c0 Add [Unreleased] section for next cycle 2026-04-18 01:32:50 +02:00
Mario Zechner
5476b56e41 Add [Unreleased] section for next cycle 2026-04-16 23:26:44 +02:00
Armin Ronacher
aa78fa91fe Add [Unreleased] section for next cycle 2026-04-16 20:06:43 +02:00
Armin Ronacher
54bbaece5c fix(ai): rebuild models 2026-04-16 19:58:40 +02:00
Armin Ronacher
a91978cf19 fix(ai): add temporary Anthropic Opus 4.7 model override 2026-04-16 17:06:23 +02:00
Mario Zechner
eb1cf80b10 fix(ai,coding-agent): replace deprecated kimi k2p5 model closes #3242 2026-04-16 12:06:24 +02:00
Mario Zechner
e0918a627b Add [Unreleased] section for next cycle 2026-04-15 23:41:16 +02:00
Mario Zechner
94f24f2102 Add [Unreleased] section for next cycle 2026-04-14 23:42:08 +02:00
Mario Zechner
852efe9596 Add [Unreleased] section for next cycle 2026-04-14 00:23:18 +02:00
Mario Zechner
2cf2a8528e Add [Unreleased] section for next cycle 2026-04-09 01:01:16 +02:00
Mario Zechner
da6e9ea473 chore(ai): update generated model catalog 2026-04-08 18:54:56 +02:00
Mario Zechner
78d4625a48 Add [Unreleased] section for next cycle 2026-04-06 00:26:57 +02:00
Vladyslav Tkachenko
a9bd8045d6 fix: update zai processing logic (#2855)
* feat: add new models and update zai processing logic

* chore(ai): removed overrides, simplify provider pick

---------

Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-04-05 23:44:17 +02:00
Mario Zechner
84d134061f Add [Unreleased] section for next cycle 2026-04-03 20:32:11 +02:00
Mario Zechner
9f9277ccdd refactor(coding-agent): replace AgentSessionRuntimeHost with closure-based AgentSessionRuntime
- Replace AgentSessionRuntimeHost and bootstrap abstractions with AgentSessionRuntime
- Runtime creation is now closure-based via CreateAgentSessionRuntimeFactory
- Factory closes over process-global fixed inputs, recreates cwd-bound services per effective cwd
- Session config (model, thinking, tools, scoped models) re-resolved per target cwd
- CLI resource paths resolved once at startup as absolute paths
- Swap lifecycle: teardown old, create next, apply next (hard fail on creation error)
- Unified diagnostics model (info/warning/error) for args, services, session resolution, resources
- No logging or process exits inside creation/parsing logic
- Removed session_directory support
- Removed session_switch and session_fork extension events (use session_start with reason)
- Moved package/config CLI to package-manager-cli.ts
- Fixed theme init for --resume session picker
- Fixed flaky reftable footer test (content-based polling)
- Fixed silent drop of unknown single-dash CLI flags
- Added error diagnostics for missing explicit CLI resource paths
- Updated SDK docs, examples, plans, exports, tests, changelog

fixes #2753
2026-04-03 20:14:12 +02:00
Mario Zechner
cbe1a8b732 fix(agent): simplify state API and update consumers fixes #2633 2026-03-30 12:43:34 +02:00
Mario Zechner
567249e8b4 Add [Unreleased] section for next cycle 2026-03-29 13:14:04 +02:00
Gordon Hui
17625cc8a2 feat(ai): add google-vertex gemini-3.1-pro-preview-customtools (#2610) 2026-03-27 02:45:58 +01:00
Mario Zechner
e24a61ef01 Add [Unreleased] section for next cycle 2026-03-27 02:31:10 +01:00
Mario Zechner
10a02d461b chore(ai): update generated models 2026-03-27 00:47:40 +01:00
Mario Zechner
6dc43d6dd1 fix(ai): prune deprecated direct minimax models 2026-03-25 22:44:32 +01:00