Commit Graph

2873 Commits

Author SHA1 Message Date
roboomp 5244b8bdcd fix(ai): omitted stale responses replay ids
Dropped rebuilt OpenAI Responses assistant item IDs when a replayed turn lacks its matching reasoning item while preserving text and call_id pairing. Added regression coverage for message, function_call, and custom_tool_call replay.\n\nFixes #4173
2026-07-01 23:15:56 +02:00
can1357 5f1ed0fcde chore: reformat 2026-07-01 23:14:36 +02:00
can1357 8bfe33fc06 Merge PR #4154: fix(coreweave): harden project header setup (@lance0) 2026-07-01 21:53:19 +02:00
can1357 93f27769ef test(ai): remove stale juice wording 2026-07-01 21:53:19 +02:00
can1357 8a76e4bc76 Merge PR #4153: fix(ai): reword GPT-5 Responses fallback prompt (@roboomp) 2026-07-01 21:53:18 +02:00
can1357 411a15cba6 Merge PR #4066: fix(providers): switch Xiaomi validation to mimo-v2.5 (@roboomp) 2026-07-01 21:53:14 +02:00
can1357 65ca8239a8 Merge PR #4053: fix(auth-broker): cache /v1/usage failures for documented 15s TTL (@roboomp) 2026-07-01 21:53:13 +02:00
can1357 bb95fcfafe Merge PR #3732: fix(ai): honor NODE_EXTRA_CA_CERTS on every provider fetch (@roboomp) 2026-07-01 21:42:25 +02:00
can1357 5356713eae chore: bump version to 16.2.13 2026-07-01 20:03:42 +02:00
can1357 105a68654e test(ai): updated model cache migration test assertions for legacy invalidation
- Updated the migration test to assert that legacy cached models are invalidated rather than preserved.
- Verified that subsequent model discovery writes fresh models correctly after invalidation.
2026-07-01 20:03:04 +02:00
can1357 9ff9c77718 fix(ai): gated reasoning.summary parameter behind gpt-5.4 wire floor
- Added a check to omit the `reasoning.summary` parameter on OpenAI Codex models older than version 5.4.
- Introduced `supportsCodexReasoningSummary` in the catalog package to identify compatible model versions.
- Added comprehensive unit tests validating correct parameter inclusion and suppression across models.
2026-07-01 19:58:13 +02:00
Lance Tuller 1f89800b52 chore(coreweave): share project setup guidance 2026-07-01 11:03:26 -04:00
Lance Tuller 526fd875a0 fix(coreweave): drop blank project header overrides 2026-07-01 11:02:39 -04:00
roboomp 0e2534bf17 fix(ai): moved responses fallback prompt
Moved the GPT-5 Responses no-reasoning fallback wording into a static markdown prompt file imported as text.

Fixes #4151
2026-07-01 14:49:25 +00:00
Lance Tuller a17066bcec fix(coreweave): harden project header setup 2026-07-01 10:49:01 -04:00
roboomp 6d3d981994 fix(ai): reword gpt-5 responses fallback
Replaced the GPT-5 Responses no-reasoning fallback developer item with non-budget wording and covered the payload regression.

Fixes #4151
2026-07-01 14:43:58 +00:00
roboomp f7328ff789 fix(providers): switched xiaomi validation to mimo-v2.5
- Updated Xiaomi MiMo standard validation and catalog defaults to use the supported mimo-v2.5 model.

- Added regression coverage for standard sk- validation and the Xiaomi default model descriptor.

Fixes #4063
2026-07-01 05:53:42 +00:00
roboomp f4055690ea style: bun run fix 2026-07-01 05:18:21 +00:00
roboomp c39dd86fba fix(auth-broker): cache /v1/usage failures for documented 15s TTL
RemoteAuthCredentialStore.#loadUsageReports() only wrote the 15s cache on
success, so every sequential fetchUsageReports()/getUsageReport() call
after a broker failure kicked off a fresh client.fetchUsage() — the exact
opposite of the 'client absorbs transient broker outages … re-attempting
after the 15s window' contract in docs/auth-broker-gateway.md.

Extend UsageCacheEntry.reports to UsageReport[] | null, write the null
result in the .catch branch alongside fetchedAt = Date.now(), and let
the existing TTL check serve later callers. Single-flight coalescing
and successful-path caching are unchanged.

Fixes #4045
2026-07-01 05:17:55 +00:00
can1357 fccc0ed3ce chore: bump version to 16.2.12 2026-07-01 05:29:19 +02:00
can1357 05c09f6191 chore: update chanelogs 2026-07-01 05:27:25 +02:00
can1357 763f950b7f fix: streamlined tool-call cloning and validation in the stream pipeline
- Improved the leaked-thinking stream projector to clone and sync native tool-call blocks directly.
- Eliminated the need for placeholder IDs and complex rekeying logic in the event controller and argument reveal module.
- Simplified native tool-call validation in owned-stream processing by requiring only a non-empty name.
- Added comprehensive unit tests to ensure tool-call IDs and partial JSON parameters remain intact during healing.
2026-07-01 05:25:27 +02:00
can1357 8e8c3e92ce Merge remote-tracking branch 'origin/farm/e0aafd27/cross-turn-tool-call-loop-guard' 2026-07-01 05:08:41 +02:00
can1357 d6e62591cf chore: update chanelogs 2026-07-01 04:47:55 +02:00
roboomp cf52840c18 fix(agent): detected repeated tool-call turns
Added a cross-turn tool-call loop guard that hashes canonical tool names and arguments, ignores intent metadata, and injects a hidden redirect when identical calls reach the configured threshold.

Fixes #3971
2026-07-01 02:47:08 +00:00
can1357 db8c79cc93 style: apply formatter and fix devin test enum
biome + cargo fmt over merge-sweep eval-fix commits; correct StopReason.END_TURN (nonexistent) to StopReason.FUNCTION_CALL in devin streaming test
2026-07-01 04:45:28 +02:00
can1357 ea36c7256a chore(changelog): normalize merge-sweep entries 2026-07-01 04:41:38 +02:00
can1357 eba952f027 test(ai): cover pi-native timeout progress reset 2026-07-01 04:40:55 +02:00
can1357 24a105377a test(ai): cover Devin arg parse throttling 2026-07-01 04:40:55 +02:00
can1357 7cb19a2d7f merge PR #3955: fix(ai): added pi-native stream timeouts 2026-07-01 04:40:39 +02:00
can1357 60530e20a1 merge PR #3952: fix(ai/providers): throttle Cursor and Devin tool-call arg parsing 2026-07-01 04:40:39 +02:00
roboomp 87575cf803 fix(ai): added pi-native stream timeouts
Added first-event and idle watchdogs to pi-native SSE reads and covered stalled gateway bodies.\n\nFixes #3947
2026-07-01 01:09:48 +00:00
roboomp 61fb0e41e9 style: bun run fix 2026-07-01 01:07:06 +00:00
roboomp df975796b8 fix(ai/providers): throttle Cursor and Devin tool-call arg parsing
Cursor and Devin called parseStreamingJson(accumulated) on every
tool-call argument delta, re-parsing the entire accumulated buffer each
chunk. For a payload of N bytes arriving as M small deltas this gave
~M full parses of an ever-growing buffer — O(N^2) total work — so
sizeable write/apply_patch arg blobs stalled streaming with visible
CPU cost and delayed toolcall_delta events.

Both providers now mirror the Anthropic / Bedrock / OpenAI pattern:
parseStreamingJsonThrottled with kStreamingLastParseLen persisted per
tool-call block, bounding mid-stream parse work to O(N). The
authoritative end-of-stream parse is unchanged (Devin's toolcall_end
loop; Cursor's toolCallCompleted mcp branch now runs a full
parseStreamingJson of the accumulated buffer before merging with the
completion frame, so the throttled tail is finalized correctly).

Fixes #3946
2026-07-01 01:06:54 +00:00
can1357 b2a859a7c5 chore: bump version to 16.2.11 2026-07-01 03:06:34 +02:00
can1357 4903ed5fe3 test(ai): updated tool call ID generation test for empty normalization scenarios
- Updated tests to verify tool_call_id generation when assistant and tool IDs normalize to empty strings.
- Added test assertions to ensure raw non-empty malformed IDs containing pipes do not leak through and instead use generated fallbacks prefixed with call_.
2026-07-01 03:06:10 +02:00
can1357 b92bd7d02c chore: update chanelogs 2026-07-01 02:58:17 +02:00
can1357 f2f62f9b8a Merge remote-tracking branch 'origin/farm/8b3cc0d0/increase-openai-stream-timeout' 2026-07-01 02:57:28 +02:00
can1357 c30526fe39 fix(ai): required non-empty name and id for native streaming tool calls
- Added `hasUsableNativeToolCall` helper to verify that a streaming tool call has non-empty, trimmed name and id values.
- Retain projection initialization and updates on subsequent deltas if the provider emits native tool identifiers late.
- Guard tool call synchronization and late salvage logic to prevent empty or invalid placeholders from corrupting streaming state.
2026-07-01 02:54:42 +02:00
roboomp db3acc6630 fix(catalog): widened local openai stream watchdogs
Widened local OpenAI-compatible stream watchdog defaults so llama.cpp and loopback providers can cold-load models without hitting the first-event abort.

Added regression coverage for both chat-completions and Responses compat.

Fixes #3940
2026-07-01 00:00:26 +00:00
can1357 ebdc7280cb chore: bump version to 16.2.10 2026-07-01 00:54:29 +02:00
can1357 92394f5c07 feat(ai): enabled streaming tool call argument deltas and validated identifier formats
- Streamed parameter chunk deltas as `toolArgDelta` events during execution for Anthropic and DeepSeek dialects.
- Integrated streaming tool call tracking in `InbandStreamProjector` to preserve native tool identifiers and partial JSON arguments.
- Added message validation functions to detect and drop malformed tool calls with empty or whitespace-only IDs.
- Introduced comprehensive suite of integration and unit tests validating argument delta streaming and tool-call sanitization.
2026-07-01 00:54:01 +02:00
can1357 cd81cc3967 fix(ai/dialect): prevented premature termination of nested thinking blocks
- Introduced the `FencedThinkingScanner` class to track nested Markdown code fences inside thinking blocks.
- Integrated the new scanner into Gemini and generic inband thinking parsers to prevent premature termination of thinking blocks.
- Added comprehensive unit and integration tests to validate nested fence retention and inline close resolution during stream parsing.
2026-06-30 21:27:12 +02:00
can1357 490662ab2e feat(ai/utils): increased the Gemini header runaway threshold
- Raised `GEMINI_HEADER_RUNAWAY_THRESHOLD` from 10 to 24 to avoid false-positive interrupts on legitimate, complex reasoning blocks.
- Added a regression test verifying that 10 distinct, progressing headers do not trip the detector while 24 headers still trigger it.
2026-06-30 20:27:52 +02:00
can1357 b6c9747d45 chore: bump version to 16.2.9 2026-06-30 18:01:59 +02:00
can1357 ac19fc1050 chore: update changelogs 2026-06-30 17:59:58 +02:00
can1357 224000ea1a Merge remote-tracking branch 'origin/farm/bfaba2dc/fix-mcp-oauth-escape-cancel' 2026-06-30 16:18:39 +02:00
can1357 51dbf94bc6 Merge remote-tracking branch 'origin/farm/40204cd0/harden-tool-call-json-parse-errors' 2026-06-30 16:17:31 +02:00
can1357 2c75ee5d38 Merge remote-tracking branch 'origin/farm/bcae1c50/fix-mcp-oauth-port-fallback' 2026-06-30 16:15:56 +02:00
roboomp 83f901d05f fix(ai): stripped transient flag for llama.cpp tool-call parse errors
- Added LLAMA_CPP_TOOL_CALL_PARSE_PATTERN and cleared Flag.Transient inside classifyMessage so the agent-level auto-retry no longer replays the same prompt against the same broken model state.

- Consolidated the duplicated detection pattern in the Ollama provider and the user-facing error rewrite to reuse the shared flags constant.

- Added a regression assertion that the finalized errorId is not Transient and not AIError.retriable for the malformed tool-call response.
2026-06-30 13:34:33 +00:00