Commit Graph
2414 Commits
Author SHA1 Message Date
can1357 94a813788f chore: bump version to 16.0.4 2026-06-17 09:44:33 +02:00
can1357 bcf29b9d1b fix(ai): fixed nested JSON coercion for tool argument values
- Enabled recursive parsing in `tryParseJsonForTypes` to coerce double-encoded JSON strings.
- Updated `coerceArgsFromIssues` to parse object/array JSON strings before singleton-array fallback.
- Prevented malformed container strings from being wrapped into arrays so validation returns array errors directly.
2026-06-17 09:43:39 +02:00
can1357 fb3534740f feat(catalog): added GLM-5.2 reasoning support for ZAI and zhipu completions
- Added ZAI GLM-5.2 reasoning-effort mapping, translating minimal to none and xhigh to max.
- Enabled ZAI and zhipu GLM-5.2 completion requests to send reasoning_effort and tool_stream.
- Added provider token clamping so GLM-5.2 completion requests use capped max_tokens.
- Updated catalog policies to route GLM-5.2 max-token and reasoning support through ZAI/zhipu hosts.
- Removed synthetic HF model entries and aligned GLM-5.2 catalog specs with real providers.

Fixes #2833
2026-06-17 09:38:43 +02:00
can1357 6b9ae4cbc3 Merge remote-tracking branch 'origin/farm/c99534a5/omit-google-auto-toolconfig' 2026-06-17 09:26:57 +02:00
roboomp 66fcb8f776 fix(providers): omitted google cli auto tool config
Stopped google-gemini-cli and google-antigravity requests from sending explicit AUTO toolConfig entries for toolChoice auto, matching the shared Google provider behavior.

Added regression coverage for both Gemini CLI provider identities.

Fixes #2830
2026-06-17 04:19:24 +00:00
roboomp 44d06ad188 fix(ai): repaired chatgpt token exchange
Added Codex connector OAuth scopes to browser login and preserved structured token endpoint error details instead of object coercion.\n\nFixes #2825
2026-06-17 03:57:31 +00:00
can1357 8eeb707387 chore: bump version to 16.0.3 2026-06-17 01:58:36 +02:00
can1357 0e049b9a1a test(ai): dropped chdir and env mutation from request-debug recording test
- Replaced `process.chdir(tempDir)` plus `PI_REQ_DEBUG=1` auto-naming with explicit `setNextRequestDebugPath` targets, removing the `previousCwd` save/restore and the `debugFiles` directory-scan helper.
- The PI_REQ_DEBUG recording assertions now read each request/response from the path they set, so the test no longer mutates `process.cwd()` or the global debug env flag.
2026-06-17 01:22:31 +02:00
roboompandcan1357 d35d1c1883 fix(ai): loosened openai pattern property fallback
Rewrote unsupported lookaround patternProperties keys to a supported catch-all pattern instead of dropping their value schemas, preserving dynamic-key tool arguments when additionalProperties is false.

Extended sanitizer and Codex conversion regression coverage for the closed dynamic-key case.

Fixes #2784
2026-06-17 00:23:37 +02:00
can1357 0f013b455e feat: added LaTeX math rendering support for terminal and TUI outputs
- Added LaTeX math and Mermaid allowances in terminal and final-chat prompts.
- Added inline math tokenization in TUI for $, $$, \(\), and \[\].
- Added LaTeX-to-Unicode conversion helpers and exports for math rendering.
- Fixed inline math detection to skip escaped dollars and currency-like spans.
2026-06-16 21:45:10 +02:00
can1357 a61abf799f fix(ai): dropped stale keyed tool-call deltas after their item closed
- Tracked whether a Responses stream event carries an identifier (`output_index` or `item_id`) in `processResponsesStream` and dropped keyed argument deltas whose item already closed instead of routing them to another open call.
- Restricted the `lastOpenItem` singleton fallback to fully identifierless mock/proxy events so real parallel tool calls keep their own argument streams.
- Added a regression test asserting stale keyed deltas after item close are dropped rather than appended to a sibling call.
- Recorded the fix in the ai changelog.
2026-06-16 20:53:18 +02:00
can1357 30158c7002 feat(ai): exported renderDelimitedThinking from the dialect barrel
- Re-exported `renderDelimitedThinking` from `./dialect/rendering` through the `@oh-my-pi/pi-ai/dialect` barrel, keeping the remaining `rendering` primitives dialect-internal.
- Documented in `dialect/index.ts` why only this one `rendering` symbol is re-exported (the legacy markdown `/dump` reuses its `<thinking>` envelope unwrap).
- Added the `### Added` changelog entry recording the new export.
2026-06-16 20:52:40 +02:00
roboomp e4444a0fe7 fix(ai): normalized stripped openai schemas
Converted schema nodes emptied by OpenAI Responses lookaround stripping to boolean true so pattern-only nodes keep the existing empty-schema semantics.

Extended sanitizer and Codex regression coverage for pattern-only property and propertyNames schemas.

Fixes #2784
2026-06-16 15:54:50 +00:00
roboomp 965afbe377 fix(ai): stripped openai pattern property lookarounds
Dropped unsupported lookaround regex keys from OpenAI Responses patternProperties maps while preserving ordinary property names and supported regex keys.

Extended sanitizer and Codex tool conversion coverage for patternProperties.

Fixes #2784
2026-06-16 15:42:32 +00:00
roboomp a93a6c3908 fix(ai): stripped openai responses regex lookarounds
Removed JSON Schema pattern values containing regex lookaround from OpenAI Responses/Codex tool schemas so incompatible MCP tools do not poison the request.

Added schema-normalization and Codex conversion regression coverage for Figma-style fileKey patterns.

Fixes #2784
2026-06-16 15:24:54 +00:00
can1357 dc14689fc1 chore: bump version to 16.0.2 2026-06-16 15:33:47 +02:00
roboompandcan1357 3e1c51b4f4 fix(ai): classified ollama context-fill errors
Recognized the empty Ollama finish_reason:length guidance as context overflow so coding-agent promotion and compaction recovery still run after surfacing the actionable error.

Added overflow utility coverage for the Ollama prompt-filled-context wording.
2026-06-16 15:33:26 +02:00
can1357 fba72680ed chore: update changelogs 2026-06-16 15:22:43 +02:00
can1357 71783191e4 Merge remote-tracking branch 'origin/farm/5abeafc4/surface-empty-length-completions' 2026-06-16 15:22:24 +02:00
can1357 f2d0c15a57 Merge remote-tracking branch 'origin/farm/88228f42/omit-gemini-auto-toolconfig' 2026-06-16 15:22:01 +02:00
roboomp 57bd545b39 fix(ai): omitted google auto tool config
Stopped serializing explicit AUTO toolConfig for Google Gemini toolChoice auto so Gemini defaults apply without triggering upstream planning JSON leaks.\n\nAdded a regression test for auto toolChoice while preserving explicit ANY and named-tool routing.\n\nFixes #2776
2026-06-16 13:13:27 +00:00
roboomp dc92a561eb fix(ai): preserved non-ollama length recovery
Scoped empty finish_reason:length error conversion to Ollama so other OpenAI-compatible providers keep the length stop used by coding-agent incomplete-output recovery.

Added regression coverage for empty non-Ollama length completions.
2026-06-16 13:12:59 +00:00
roboomp 5401e6ec73 fix(ai): surfaced empty ollama length completions
Mapped empty Ollama OpenAI-compatible finish_reason:length completions to a provider error with actionable num_ctx guidance instead of a silent length stop.

Added regression coverage for the empty length stream path and recorded the package-local checks.

Fixes #2774
2026-06-16 12:57:15 +00:00
can1357 0cc4b5f9a7 Merge PR #2698: fix(ai): unwrap Anthropic thinking envelopes
Preserve signed thinking bytes when unwrapping Anthropic thinking envelopes. Residual over the already-landed core (commit 7936ea2ac3) that fixes a still-live signed-whitespace P1 in main (issue #2695).
2026-06-16 14:53:39 +02:00
can1357 89d4dfae46 Merge PR #2751: fix(providers): handle Umans Kimi output caps and web search
Clamp Umans Kimi output caps, forward the gateway web-search header on per-request options, and escape builtin tool names for Umans. NOTE: bundle regen pulled incidental, benign models.dev drift.
2026-06-16 14:53:39 +02:00
can1357 aa848034c6 Merge PR #2702: fix(ai): unwrap thinking envelopes in raw dumps
Unwrap literal <thinking> envelopes in the render-layer raw dumps (issue #2700). Includes review test 222562ecb2 (render-layer regression coverage). Orthogonal to #2698 (provider-source layer).
2026-06-16 14:52:42 +02:00
can1357 44a9e24692 Merge PR #2699: fix(ai): align Codex OAuth originator
Align the Codex browser-login originator with the request-header originator ('pi') to fix the post-login 401 (issue #2696).
2026-06-16 14:52:41 +02:00
can1357 5e1215f0ee Merge PR #2719: fix(ai): route prefixed Responses tool deltas
Route prefixed Responses tool-call deltas by call_id alias (issue #2715). Includes review fix f6ab97843c: fall through to the prefixed alias when a delta's output_index was never registered (llama.cpp/Ollama streams).
2026-06-16 14:52:41 +02:00
can1357 222562ecb2 test(ai): cover renderDelimitedThinking literal-envelope unwrap
Adds render-layer regression coverage in packages/ai, where the #2702 fix lives. Asserts the anthropic dialect unwraps a single literal <thinking> envelope (no nesting), unwraps sibling envelopes independently (no malformed close/open boundary), and that a <thinking> envelope is not mistaken for the qwen3 <think> delimiter (prefix safety). The PR's existing test lives only in packages/coding-agent and cannot exercise the fix under the shared workspace node_modules symlink.

Addresses review feedback on #2702.
2026-06-16 14:31:23 +02:00
can1357 f6ab97843c fix(ai): fall through to prefixed alias when delta output_index is unregistered
Spec-shaped Responses argument deltas always carry output_index, but llama.cpp/Ollama omit it on output_item.added (issue #2015), so the index is never registered. The early return trusted the stale index and dropped to lastOpenItem before consulting the prefixed fc_<call_id> alias map, folding every parallel delta into the most-recently-added call and leaving earlier ast_grep calls with {}. Try the output-index map first, then fall through to the alias/exact lookup. Adds a regression test for the unregistered-index shape.

Addresses review feedback on #2719.
2026-06-16 14:27:56 +02:00
roboompandcan1357 7936ea2ac3 fix(ai): preserved unwrapped thinking signatures
Tracked whether Anthropic thinking-envelope normalization actually stripped a wrapper before mutating thinking bytes or clearing signatures.

Added coverage for signed thinking with surrounding whitespace to preserve byte-for-byte replay.

Fixes #2695
2026-06-16 14:25:46 +02:00
roboompandcan1357 7d63c3589b fix(ai): aligned codex oauth originator
Used the shared Codex originator constant for browser OAuth URLs so login credentials match the headers sent by OMP Codex requests.

Added a regression test covering the browser-login URL originator.

Fixes #2696
2026-06-16 14:22:09 +02:00
oldschoola 61c6e9cd8e fix umans custom client websearch header 2026-06-16 01:51:07 -07:00
oldschoola 37ceece944 fix umans escaped tool roundtrip 2026-06-16 01:32:50 -07:00
oldschoola 251d7dbb86 fix umans gateway websearch handling 2026-06-16 01:14:43 -07:00
roboomp 0c8ad02fa2 fix(ai): isolated responses alias lookup keys
Kept synthesized fc_<call_id> aliases in a separate lookup map so real call_id keys like fc_x cannot overwrite aliases for call_id x.

Extended the parallel ast_grep regression to cover x/fc_x call-id collisions under prefixed delta routing.

Fixes #2715
2026-06-16 00:14:41 +00:00
roboomp 45cb58d585 fix(ai): handled fc-prefixed responses call ids
Always register the synthesized fc_<call_id> lookup key for Responses tool calls, even when the call_id already starts with fc_.

Extended the parallel ast_grep regression to cover call_id values with an existing fc_ prefix.

Fixes #2715
2026-06-15 23:46:52 +00:00
roboomp 524b022259 fix(ai): routed prefixed responses tool deltas
Registered OpenAI Responses function-call stream items under both their bare call_id and synthesized fc_<call_id> key so Ollama/local parallel tool deltas no longer fall back to the most recent call.

Added a regression covering parallel ast_grep calls whose argument deltas use prefixed item ids.

Fixes #2715
2026-06-15 23:31:40 +00:00
Asaf Mahlev 86523bc7cc fix(openai-responses): quarantine invalid tool schemas instead of failing the turn
One MCP tool whose input schema can't be emitted as a valid strict tool schema
for the active provider made the whole request 400, so the assistant couldn't
respond at all (#2652). `convertTools` now validates each tool's emitted
parameter schema for enum/const-vs-type contradictions that pass structural
JSON-Schema validation but the provider rejects (a non-null enum on a
type:"null" node; an enum on an array node), and drops just the offending tool
with a `logger.warn` naming the tool + schema path, keeping the rest of the
request valid.

- New `findStrictToolSchemaViolation` in utils/schema: a semantic enum/const-vs-
  type checker. The existing `isValidJsonSchema` is structural-only and accepts
  these contradictions, which is exactly why they reach the provider.
- Tests: the three reported shapes (nullable-enum, enum-on-array, anyOf/const),
  nested-path reporting, valid combinations incl. nullable unions, and the
  convertTools quarantine (bad tool dropped, others survive).
2026-06-16 02:26:35 +03:00
roboomp e904585060 fix(ai): preserved sibling thinking envelopes
Parsed literal thinking envelopes independently before transcript rendering so interleaved thinking blocks do not collapse into one malformed wrapper. Added advisor raw dump regression coverage for sibling literal thinking blocks.\n\nFixes #2700
2026-06-15 21:05:08 +00:00
roboomp a0481ac070 fix(ai): unwrapped thinking envelopes in raw dumps
Normalized dialect thinking rendering so stored thinking content that already carries literal thinking tags is unwrapped before transcript serialization. Added advisor raw dump regression coverage.\n\nFixes #2700
2026-06-15 20:44:39 +00:00
can1357 e24f789de4 chore: bump version to 16.0.1 2026-06-15 21:30:30 +02:00
roboompandcan1357 4a55e0c784 fix(ai): cleared rewritten thinking signatures
Cleared Anthropic thinking signatures when literal thinking-envelope normalization changes provider bytes, preventing same-model replay from pairing stale signatures with rewritten text.

Extended the wrapped-thinking regression test to verify replay demotes the rewritten block instead of sending an invalid signed thinking block.

Fixes #2695
2026-06-15 21:30:08 +02:00
can1357 d72cd25162 Merge remote-tracking branch 'origin/farm/fc54418d/opus-thinking-tags-advisor' into merge-train-v3 2026-06-15 21:13:38 +02:00
roboomp e7d9b327b2 fix(ai): unwrapped anthropic thinking envelopes
Normalized Anthropic thinking deltas that arrive wrapped in literal thinking tags before finalizing the parsed thinking block.

Added a stream regression test covering nested provider thinking wrappers so advisor raw dumps do not render duplicated tags.

Fixes #2695
2026-06-15 19:09:25 +00:00
can1357 b27737df9e chore: fix changelogs 2026-06-15 19:51:53 +02:00
can1357 fcde870bc0 Merge PR #2636: Add Umans AI Coding Plan provider 2026-06-15 19:46:11 +02:00
can1357 5272e56ad0 Merge PR #1887: fix: apply OpenAI Responses onPayload replacements 2026-06-15 19:46:11 +02:00
can1357 934e30d897 Merge PR #1853: fix(cursor): distinguish tool errors from successes in prompt history 2026-06-15 19:46:11 +02:00
can1357 781180e588 Merge PR #2625: fix(ai/cursor): preserve large MCP tool-call args during streaming 2026-06-15 19:46:10 +02:00