Commit Graph

3817 Commits

Author SHA1 Message Date
Mario Zechner
ea90a6783d fix(coding-agent): disable undici body/headers idle timeouts on global dispatcher
Long local-LLM SSE streams (e.g. vLLM buffering large tool calls) exceeded
undici's default 300s bodyTimeout and aborted with UND_ERR_BODY_TIMEOUT.
retry.provider.timeoutMs cannot lift this cap because it controls the
provider SDK's AbortController deadline, not undici's per-socket idle timer.

Pass { bodyTimeout: 0, headersTimeout: 0 } to EnvHttpProxyAgent. Provider
SDKs still enforce their own timeouts via retry.provider.timeoutMs.

closes #3715
2026-04-27 20:42:37 +02:00
github-actions[bot]
61fa49dd97 chore: approve contributor LooSik 2026-04-27 18:42:26 +00:00
Mario Zechner
aefb0fedfe feat(coding-agent): add warnings.anthropicExtraUsage opt-out
closes #3808
2026-04-27 20:36:00 +02:00
Mario Zechner
e4f847ff68 fix(coding-agent): close bash executor temp streams
closes #3786
2026-04-27 20:36:00 +02:00
github-actions[bot]
a0d4087037 chore: approve contributor cristinaponcela 2026-04-27 18:12:11 +00:00
marcbloech
9dcde1e3fa add cognitive services implementation (#3799) 2026-04-27 18:38:03 +02:00
mdsjip
5b8deef2f9 fix(coding-agent,ai): fallback to /proc/self/environ in Bun sandbox (#3801)
Bun compiled binaries have an empty process.env when running inside
sandbox environments (e.g. nono on Linux/macOS). This broke API key
detection and model discovery because all process.env.* lookups returned
undefined.

- Add restoreSandboxEnv() helper that reads /proc/self/environ when Bun
  is detected and process.env is empty, populating process.env before
  any other code runs (coding-agent/src/bun/cli.ts entry point)
- Add getProcEnv() fallback in env-api-keys.ts for direct @mariozechner/pi-ai
  consumers that may not go through the coding-agent entry point
- Add unit tests for restoreSandboxEnv
2026-04-27 18:36:53 +02:00
mdsjip
cbe421f877 fix(coding-agent): work around Bun empty process.env inside sandbox (#3807)
Bun bug oven-sh/bun#27802 causes process.env to be empty when running inside a Linux sandbox (Landlock/seccomp).
This breaks npm resolution because PATH is missing, crashing pi on startup with:

  Failed to run npm root -g: Executable not found in $PATH: "npm"

Add getSandboxEnv() to read /proc/self/environ as a fallback on Linux when process.env has zero keys.
Pass this env to all spawn calls in package-manager.ts.
Also fix runCommandSync error handling: check result.error in addition to result.status, and include result.error?.message in the error text so spawn failures (e.g. ENOENT) produce useful diagnostics instead of "null".

Fixes #3806
2026-04-27 18:34:20 +02:00
Aliou Diallo
10425abb87 fix(coding-agent): dedupe symlinked resources (#3818)
* fix(coding-agent): dedupe symlinked resources

Fixes #3767

* refactor(coding-agent): extract canonicalizePath util for symlink resolution
2026-04-27 18:33:10 +02:00
github-actions[bot]
6a10c17219 chore: approve contributor justinpbarnett 2026-04-27 16:27:32 +00:00
github-actions[bot]
dd3de4b49b chore: approve contributor thirtythreeforty 2026-04-27 16:25:42 +00:00
github-actions[bot]
2a7e82d3ef chore: approve contributor injaneity 2026-04-27 08:53:06 +00:00
pidalf
05f79b0851 docs: explain issue triage policy (#3725)
* docs: explain issue triage policy

* docs: clarify issue triage wording
2026-04-25 23:02:17 +02:00
github-actions[bot]
d2f8bd6deb chore: approve contributor pidalf 2026-04-25 20:59:54 +00:00
anirudhmarc
5a07d946ef fix(bedrock): check model.name for prompt caching and adaptive thinking (#3527)
supportsPromptCaching, supportsAdaptiveThinking, supportsThinkingSignature,
and the Claude detection in streamSimpleBedrock/buildAdditionalModelRequestFields
all check model.id for Claude model name patterns. Application inference profile
ARNs are opaque and do not contain the model name, so these checks silently fail.

Fix by also checking model.name (user-controlled via models.json or
registerProvider) as a fallback in all affected functions. Added a shared
isAnthropicClaudeModel helper for the common Claude detection pattern.

Fixes #2925

Co-authored-by: Your Name <you@example.com>
2026-04-25 19:58:17 +02:00
Mario Zechner
c19e64a444 fix(coding-agent): refresh title after extension session rename
closes #3686
2026-04-25 17:20:26 +02:00
Mario Zechner
a363b668ac fix(coding-agent): clear tree navigation compaction state
closes #3688
2026-04-25 17:03:09 +02:00
Mario Zechner
3e7ffff184 fix(ai): ignore unknown anthropic sse events
closes #3708
2026-04-25 16:57:03 +02:00
Mario Zechner
953f89fbe9 chore(ai): lower codex default verbosity 2026-04-25 16:20:56 +02:00
Armin Ronacher
dcf2651631 feat(coding-agent): Add built-in update command (#3680) 2026-04-25 13:09:33 +02:00
Mario Zechner
0b271a2c4f fix(coding-agent): polish border status editor example
closes #3674
2026-04-24 23:24:38 +02:00
Mario Zechner
6580dae400 feat(coding-agent): allow hiding working loader
closes #3674
2026-04-24 23:17:43 +02:00
Armin Ronacher
02e694b580 doc: pi can read its own docs 2026-04-24 22:25:47 +02:00
Mario Zechner
91154d9757 fix: update stale CI test expectations 2026-04-24 20:22:16 +02:00
Aliou Diallo
39a9784d2a fix(coding-agent): preserve models when re-registering provider with overrides only (#3651)
Previously, registerProvider() overwrote the stored config for a provider,
so a models registration followed by a baseUrl/headers-only override lost
the models. After refresh(), only the override-only config was replayed,
causing extension-provided models to disappear.

Added upsertRegisteredProvider() that merges defined fields into the
existing stored config instead of replacing it. Fields absent from the
incoming config are preserved from the stored config.

Also adds regression tests for dynamic provider override persistence
across refresh.
2026-04-24 20:15:35 +02:00
Mario Zechner
9b103e5e41 fix(ai): replay DeepSeek V4 reasoning content
closes #3668
2026-04-24 19:32:51 +02:00
Mario Zechner
b4e93feb8c fix(ai): preserve DeepSeek V4 Pro xhigh reasoning
closes #3662
2026-04-24 18:55:12 +02:00
Armin Ronacher
35eae2578c doc: Add documentation index 2026-04-24 18:09:27 +02:00
Armin Ronacher
39db145495 fix(coding-agent): show models.json auth in login selector 2026-04-24 17:28:40 +02:00
HQidea
3e0ee69b5e fix(ai): omit tools field instead of sending empty array (#3650)
DashScope / Aliyun Qwen (OpenAI-compatible) rejects `tools: []`
with HTTP 400 `"[] is too short - 'tools'"`. Five providers used
a truthy check (`if (context.tools)`) that treated an empty array
as "send tools", so `pi --no-tools` produced `tools: []` in the
request body. Matching the Google provider's pattern, we now
guard on `context.tools.length > 0`:

- openai-completions.ts
- openai-responses.ts
- openai-codex-responses.ts
- azure-openai-responses.ts
- anthropic.ts

The openai-completions fallback that emits `tools: []` when the
conversation has tool history (required by LiteLLM / Anthropic
proxies) is preserved via the existing `else if (hasToolHistory)`
branch.

closes #3649

Co-authored-by: 槐聚 <huaiju@zbyte-inc.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-04-24 14:24:31 +02:00
Mario Zechner
6160892626 Add [Unreleased] section for next cycle 2026-04-24 14:20:18 +02:00
Mario Zechner
48aa882b5a Release v0.70.2 2026-04-24 14:19:20 +02:00
Mario Zechner
c1b62ae7fe fix(ai,coding-agent): omit undefined provider request options closes #3627 2026-04-24 14:18:35 +02:00
Mario Zechner
90d8051636 Add [Unreleased] section for next cycle 2026-04-24 14:09:27 +02:00
Mario Zechner
6b443c685f Release v0.70.1 2026-04-24 14:08:25 +02:00
Mario Zechner
b121235379 chore: audit unreleased changelogs 2026-04-24 14:07:35 +02:00
Mario Zechner
b38e546e90 chore: label weekend issue closures 2026-04-24 13:58:18 +02:00
Mario Zechner
7bd9f6500d fix(coding-agent): avoid cmd.exe for git installs on windows closes #3642 2026-04-24 13:56:10 +02:00
Mario Zechner
c06750410a fix(ai,coding-agent): expose provider timeout/retry controls closes #3627 2026-04-24 13:33:00 +02:00
Georgi
d06db09a53 fix(tui): decode CSI-u Ctrl+letter inside bracketed paste, fixes #3599 (#3623)
Co-authored-by: Georgi Chochev <georgi.chochev@siteground.com>
2026-04-24 13:30:49 +02:00
Mario Zechner
6e6c9b4d28 docs(coding-agent): document DeepSeek provider support
closes #3636
2026-04-24 12:55:58 +02:00
Mario Zechner
1e33492525 fix(coding-agent): harden clipboard copy
closes #3639
2026-04-24 12:55:58 +02:00
github-actions[bot]
9fdb12f985 chore: approve contributor marcbloech 2026-04-24 09:43:54 +00:00
Mario Zechner
ebbc67df5d docs(coding-agent): fix extension flag lookup docs
closes #3614
2026-04-24 11:41:51 +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
612be54c28 Release v0.70.0 2026-04-24 01:00:41 +02:00
Mario Zechner
55fbd9b286 chore(coding-agent): audit and update changelog entries since v0.69.0 2026-04-24 00:59:08 +02:00
Mario Zechner
f2f03616ab fix(coding-agent): update provider auth guidance and defaults 2026-04-24 00:55:27 +02:00
Mario Zechner
2926f7e887 chore: update generated models 2026-04-24 00:55:27 +02:00