Commit Graph

4423 Commits

Author SHA1 Message Date
Petr Houška f7b78e2a42 fix(ai): route GitHub Copilot MAI-Code models through /responses endpoint (#6544)
mai-code-1-flash-picker is not accessible via /chat/completions and
must use the Copilot /responses endpoint. Update generate-models.ts to
send mai-* models to the responses API and regenerate the affected
model entry.
2026-07-13 09:56:40 +02:00
Alexey Zaytsev eacaa130ab ai: OpenAI and Codex forced tool calls (#6588)
* feat(ai): support forced OpenAI Codex tool calls

* feat(ai): support OpenAI Responses tool choice
2026-07-13 09:48:33 +02:00
Rafał Krzyważnia 8479bd8474 fix(tui): parse legacy alt-prefixed symbols (#6523) 2026-07-11 15:20:08 +02:00
Mark Phelps bdd5c53bcd fix(ai): fall back to ambient Cloudflare account id for key-only credentials (#6292)
Cloudflare Workers AI / AI Gateway resolved provider config from the
credential only, never consulting ambient env for a field the credential
omitted. The coding-agent /login flow stores just the API key, so
CLOUDFLARE_ACCOUNT_ID lives only in the environment; the key-only credential
short-circuited the env lookup, the account id stayed unresolved, and requests
hit the literal {CLOUDFLARE_ACCOUNT_ID} base URL -> 404.

resolveValue now merges per field: prefer the credential value, fall back to
ctx.env(name).

closes #6021

Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com>
Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-07-11 14:30:40 +02:00
Armin Ronacher 850c210b77 fix(ai): filter ambient auth markers in compat dispatch 2026-07-11 13:38:48 +02:00
Rafał Krzyważnia 19fe0e01c5 fix(ai): preserve ambient AWS auth for Bedrock
Do not treat Pi’s internal ambient-auth marker as a Bedrock bearer token. This preserves SigV4 signing for AWS profiles, IAM credentials, and roles while retaining bearer authentication for real Bedrock API keys.\n\nFixes #6531
2026-07-11 13:12:23 +02:00
Armin Ronacher 4c1861033b docs: audit unreleased changelogs 2026-07-11 00:01:31 +02:00
Armin Ronacher 3d8f74357c feat(ai): support message-anchored tool loading (#6474)
This adds cache-friendly dynamic tool loading anchored to tool results. Purely additive active-tool changes are recorded with `addedToolNames`, allowing supported Anthropic and OpenAI Responses models to load tool definitions at the point they become available instead of placing them in the cached prompt prefix.

It retains safe fallback behavior for unsupported models and non-additive changes but it will wipe caches.
2026-07-10 23:52:54 +02:00
Armin Ronacher d7a48d30a0 fix(coding-agent): fall back to text clipboard paste 2026-07-10 21:46:15 +02:00
Armin Ronacher 3b686ac224 feat(coding-agent): add message copy shortcut 2026-07-10 21:35:53 +02:00
Armin Ronacher 3ea064ea2a fix: support Bedrock API key login 2026-07-10 19:34:11 +02:00
David Brailovsky bc469b0338 add xhigh and max to all fable-5 providers (#6490)
related to #6374
2026-07-10 11:42:53 +02:00
David Brailovsky 46145bef07 fix openrouter models: use context length from top provider (#6481)
fixes #6378
2026-07-10 09:51:53 +02:00
Armin Ronacher 34582ef34b Add [Unreleased] section for next cycle 2026-07-10 01:16:58 +02:00
Armin Ronacher 2b3fda9921 Release v0.80.6 2026-07-10 01:16:55 +02:00
Armin Ronacher 5b4bda305e fix(ai): refresh generated model catalogs 2026-07-10 01:16:27 +02:00
Armin Ronacher 1775fe4c52 docs: audit unreleased changelogs 2026-07-10 01:13:38 +02:00
Armin Ronacher 338746596b fix(ai): isolate service-tier pricing test 2026-07-10 01:02:55 +02:00
David Brailovsky 6731a0ba9e fix: send anthropic thinking blocks also when thinking text is empty (#6457)
fixes: #6376
2026-07-09 23:25:22 +02:00
Aaron Ky-Riesenbach 1a2542b11b feat(coding-agent): expand ~ in shellPath setting (#6470)
getShellPath() now runs the configured shellPath through the existing
normalizePath() helper, mirroring getSessionDir(). This lets shellPath
point at a home-directory-relative shell wrapper (e.g.
~/.local/bin/agent-shell-sandbox) and resolves consistently across
machines and OSes with different home directories.

refs #6458
2026-07-09 23:23:06 +02:00
Armin Ronacher 3664806f2f fix(ai): add GPT-5.4 and GPT-5.5 long-context pricing 2026-07-09 23:13:58 +02:00
Armin Ronacher a9ecf301fb feat(ai): add input-based pricing tiers 2026-07-09 22:44:29 +02:00
Armin Ronacher 6c735db060 fix(ai): exclude nonexistent GPT-5.6 alias 2026-07-09 22:44:08 +02:00
Mario Zechner fbdd46389c feat(ai): add max thinking level 2026-07-09 22:30:53 +02:00
Mario Zechner 8973ae28ab fix(ai): ignore stale usage after compaction
closes #6464
2026-07-09 21:44:53 +02:00
Armin Ronacher e3513193bf Add [Unreleased] section for next cycle 2026-07-09 21:04:09 +02:00
Armin Ronacher cc62baa442 Release v0.80.5 2026-07-09 21:04:06 +02:00
Armin Ronacher a98778e21c test(coding-agent): fix interactive mode fixture 2026-07-09 21:01:50 +02:00
Armin Ronacher ef793a983b Add [Unreleased] section for next cycle 2026-07-09 20:53:01 +02:00
Armin Ronacher 912d0953f6 Release v0.80.4 2026-07-09 20:52:57 +02:00
Armin Ronacher bf75b8aa39 docs: audit unreleased changelogs 2026-07-09 20:45:28 +02:00
Armin Ronacher 7df2a94e0f feat(ai): add GPT-5.6 model metadata 2026-07-09 20:32:29 +02:00
Armin Ronacher 3f9aa5d10b feat(coding-agent): add prompt cache miss tracking (#6427)
Detect prompt cache misses per turn by comparing each assistant message's
cache reads against the previous request's prompt tokens (core/cache-stats.ts).
Significant misses emit a warning-colored transcript notice at the turn they
occur, noting idle gaps past the cache TTL and model switches when relevant.

/session gained cache statistics: a compact token/cache breakdown with hit
rate, a $-prefixed cost section with per-model cost breakdown, and the
cumulative cost re-billed due to cache misses.
2026-07-09 14:12:57 +02:00
David Brailovsky 57d96d72ed add ResourceExhausted as a retryable error (#6449)
fixes #6364
2026-07-09 13:58:32 +02:00
Mario Zechner a6f720e6ca fix(coding-agent): count custom messages in compaction budget
closes #6326
2026-07-09 12:46:03 +02:00
Mario Zechner e9fa5a68a1 fix(coding-agent): add settled agent lifecycle event
closes #6363
2026-07-09 12:42:08 +02:00
Mario Zechner 1ffca0f2aa fix(coding-agent): align reload descriptions
closes #6395
2026-07-09 11:47:44 +02:00
Mario Zechner c4281a7dd1 fix(coding-agent): warn when session-id creates a session
closes #6407
2026-07-09 11:37:07 +02:00
Mario Zechner 2170363af4 fix(coding-agent): avoid Windows context file walk hang
closes #6369
2026-07-09 11:30:59 +02:00
Mario Zechner c6251a866b fix(coding-agent): apply modelOverrides to extension providers
closes #6367
2026-07-09 11:22:35 +02:00
Mario Zechner 4285712bae fix(ai): retry Bun socket drops
closes #6431
2026-07-09 11:03:58 +02:00
Mario Zechner 72d77b53de fix(ai): update model catalogues 2026-07-09 11:03:58 +02:00
Mario Zechner 9eedaf8cf3 fix(ai): update GitHub Copilot extended context windows to 1M
Updates GitHub Copilot built-in model metadata so models with GitHub's extended 1M capability use contextWindow 1000000 in Pi, preventing early compaction and under-budgeting for Claude Opus 4.7/4.8 and GPT-5.3 Codex/5.4/5.5.

Verified against raw docs markdown extended-capabilities table and live /models reports.

closes #6439
2026-07-09 10:39:27 +02:00
Mario Zechner cb222bf99d feat(agent): export InMemorySessionStorage and JsonlSessionStorage
Export both session storage implementations from @earendil-works/pi-agent-core
so they can be imported and extended directly instead of via repo workaround.

closes #6435
2026-07-09 10:22:30 +02:00
David Brailovsky 86afffe01f fix fork menu allowing user to double select an entry (#6430)
in cases where forking a session was not immediate due to extensions
slowing down teardown, it's possible for the user to select the
message to fork more than once and then create multiple session forks.

in this fix we close the forking menu before starting the fork process
to not allow such behavior.

fixes #6321
2026-07-08 18:23:22 +02:00
Mario Zechner dd1c690f36 fix(agent): add session context entry projection 2026-07-08 14:59:16 +02:00
Armin Ronacher 312bc713bb feat(coding-agent): support provider arguments for login 2026-07-08 12:06:26 +02:00
David Brailovsky 62f45badae Fix native clipboard in bun release (#6418)
* copy native clipboard .node files to the clipboard package

under the bun binary packaging, require("@mariozechner/clipboard-linux-x64-gnu")
doesn't work so instead we rely on require("./clipboard.linux-x64-gnu.node")
for that we need to copy the .node files to the clipboard package dir

* fallback to xclip if native clipboard fails on x11
2026-07-08 11:20:24 +02:00
ArcadiaLin 7198e78f99 feat(agent): support custom metadata in jsonl session headers (#6417)
Allow callers to attach an opaque JSON object to the session header so
application context needed to rebuild a harness (for example an agent
profile reference) is readable from the first line alone, without
scanning session entries. The field is optional and ignored by readers
that do not use it; fork inherits the source metadata unless overridden.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 11:18:43 +02:00
Vegard Stikbakke cc2db98002 fix(ai): refresh Xiaomi token plan model catalogs
Use the new provider-specific Xiaomi Token Plan catalogs from models.dev instead of cloning the API-billing Xiaomi catalog into every token-plan region. This removes API-billing-only models such as mimo-v2-omni from xiaomi-token-plan-{cn,ams,sgp}.
2026-07-08 10:17:48 +02:00