Commit Graph

18118 Commits

Author SHA1 Message Date
Yang Yang 86866b8bbf fix(catalog): omit Responses penalties on all first-party xAI models
xAI's /v1/responses rejects presence/frequency penalties for every Grok
model, not only reasoners. Gate supportsPenaltyAndStopParams on isXaiHost
so xai/grok-2 no longer serializes presence_penalty.
2026-08-14 22:02:52 -07:00
Yang Yang 76faddf886 fix(catalog): omit reasoningEffortMap on no-dial xAI rows
The clamp map is only used when reasoning.effort is sent. Drop it from
catalog rows that set omitReasoningEffort so the exported snapshot does
not advertise a dead mapping.
2026-08-14 22:02:52 -07:00
Yang Yang 09830d2bd6 fix(catalog): drop unsupported xhigh effort from first-party Grok
api.x.ai accepts low/medium/high (and clamps minimal to low). Stop
advertising xhigh on paid xai and SuperGrok Responses rows, and map
leftover xhigh/max requests to high.
2026-08-14 22:02:52 -07:00
Yang Yang 6c0f458279 fix(catalog): rebuild paid xAI Responses discovery after helper rename
origin/main replaced createSimpleOpenAIResponsesOptions with the shared
OpenAI-compatible manager builder. Point xaiModelManagerOptions at that
same helper so XAI_API_KEY still discovers via /v1/responses.
2026-08-14 22:02:07 -07:00
Yang Yang 4c150d2a05 docs: keep xAI changelog entries under Unreleased after 17.2.12
Rebase onto origin/main replayed the Unreleased bullets into already
released 17.2.x sections. Move them back to the top.
2026-08-14 22:02:07 -07:00
Yang Yang 01db5b04ee fix(catalog): omit unsupported reasoning.summary on paid xAI Responses
First-party xAI /v1/responses rejects reasoning.summary. Bake
supportsReasoningSummary=false for both xai and xai-oauth so paid
grok-4.5 effort requests send only reasoning.effort, matching SuperGrok.
2026-08-14 22:02:07 -07:00
Yang Yang b49b5b88d2 fix(catalog): strip stale xAI Responses effort dials from generated rows
Paid xAI models.dev regeneration still emitted Completions-era thinking
dials for off-allowlist reasoners. Bake the no-dial policy into the
resolver/generator and refresh the exported catalog snapshot.
2026-08-14 22:02:07 -07:00
Yang Yang 3fb57803f3 fix(catalog): omit penalty and stop params on xAI reasoning models
Grok 4.5 rejects presencePenalty, frequencyPenalty, and stop. After the
paid default moved off a non-reasoning model, configured penalties 400ed.
2026-08-14 22:00:51 -07:00
Yang Yang ca2fa4f5f6 fix(ai): do not treat XAI_API_KEY as SuperGrok availability
Paid-key-only setups were marked signed in for xai-oauth, so the shared
grok-4.5 default picker preferred SuperGrok over xai/grok-4.5.
2026-08-14 22:00:50 -07:00
Yang Yang 7a3a558895 fix(catalog): clamp paid xAI Responses minimal effort to low
Grok 4.5 on XAI_API_KEY kept a minimal dial without SuperGrok's
minimal→low wire map, which can 400 on /v1/responses.
2026-08-14 22:00:50 -07:00
Yang Yang ef7759782d fix(catalog): drop stale xAI Chat Completions model-cache rows
Invalidate cached paid-xAI ids on static fingerprint mismatch so the
Responses migration is not stuck behind a fresh completions cache overlay.
2026-08-14 22:00:50 -07:00
Yang Yang bd44ff190c docs: keep xAI changelog entries under Unreleased after 17.2.5
Rebase onto origin/main landed those notes in the released section; move
them back and drop duplicated 17.2.5 Changed bullets.
2026-08-14 22:00:50 -07:00
Yang Yang 651f20957b feat(catalog): replay xAI encrypted reasoning on later turns
Stop stripping type=reasoning history for xai and xai-oauth so
encrypted_content from include is sent back on the next Responses request.
2026-08-14 22:00:50 -07:00
Yang Yang c228dea58b feat(catalog): route paid xAI through Responses like SuperGrok
Switch XAI_API_KEY models from Chat Completions to /v1/responses, default
both xai and xai-oauth to grok-4.5, and include reasoning.encrypted_content.
2026-08-14 22:00:50 -07:00
can1357 ffd53ff92a chore: bump version to 17.3.4 2026-08-14 14:38:16 +02:00
can1357 a3c15d2dec feat(coding-agent/tools): implemented pdf page screenshot rendering
- Add `renderPdfPageScreenshot` to render PDF pages via headless Chromium.
- Update `ReadTool` to intercept legacy PDF image paths and return page screenshots.
- Ensure daemon clients are closed on read command exit.
2026-08-14 14:37:56 +02:00
can1357 85acb9ab70 fix(rpc): surface drained stderr when startup fails under load
- RpcClient: when stdout closes before ready, race child.exited (which settles only after ptree drains the stderr tail for nonzero exits) for 250ms before rejecting, so the earlier-registered exit watcher rejects with the real stderr text instead of an empty 'Stderr:'.
- mock-rpc-agent fixture: await the stderr pipe write callback before process.exit so failure text cannot be dropped unflushed.
- sdk-tool-activation: restore the default extension-handler budget once the intentionally stalled activation times out, so full-suite machine load cannot also time out the genuine recovery registration.
Both tests flaked only under concurrent full-suite chunk load; 10 concurrent stress runs pass post-fix.
2026-08-14 14:23:15 +02:00
can1357 db6460c6c5 test(tui): restored process stream descriptors in issue-8542 repro teardown
- Replaced Reflect.deleteProperty teardown with the descriptor-preserving restoreProperty pattern used by the other ProcessTerminal suites, so real isTTY/setRawMode/columns/rows own-properties survive on TTY hosts and later test files are not poisoned.
2026-08-14 14:16:38 +02:00
can1357 42d5ca5128 fix(pi-natives): backticked DeviceCheck in doc comment for clippy doc-markdown 2026-08-14 14:13:54 +02:00
can1357 56efdfc4db Merge PR #8546: fix(coding-agent): restore Windows external editor launch (@roboomp) 2026-08-14 14:12:00 +02:00
can1357 7384e2c246 Merge PR #8543: fix(tui): swallow late DA responses for the whole session (@roboomp) 2026-08-14 14:12:00 +02:00
can1357 c0ad44b6fc Merge PR #8533: fix(pi-natives): guard DeviceCheck token generation on GUI session (@roboomp) 2026-08-14 14:11:51 +02:00
can1357 aae72bd5ef Merge PR #8531: docs: correct /hotkeys Ctrl+D copy to match save-draft-and-exit (@roboomp) 2026-08-14 14:11:51 +02:00
can1357 7ba71c2e51 Merge PR #8527: fix(agent): add Codex V2 compaction feature header (@roboomp) 2026-08-14 14:11:44 +02:00
can1357 d3d326a8f2 Merge PR #8526: fix(mnemopi): keep global rows recallable under channelId filter (@roboomp) 2026-08-14 14:11:44 +02:00
can1357 69a856ea3e Merge PR #8519: fix(catalog): grant low/high/max to OpenRouter deepseek-v4-pro-0813 (@roboomp) 2026-08-14 14:11:38 +02:00
can1357 d445f987da Merge PR #8515: fix(mcp): initialize sessions before opening sse stream (@roboomp) 2026-08-14 14:11:30 +02:00
can1357 04fab5ecb4 feat: replaced custom mupdf wasm pipeline with native function
- Replaced the custom MuPDF-WASM PDF extraction and rendering pipeline with the new `pdfToMarkdown` native function from `@oh-my-pi/pi-natives`.
- Removed legacy MuPDF extraction modules, WASM embedding scripts, and PDF image extraction tools.
- Added OCR warnings and browser/text redirection for unsupported PDF image reads.
- Updated native package definitions, documentation, and test suites for the new PDF inspection capability.
2026-08-14 14:08:28 +02:00
roboomp a9075ae509 fix(coding-agent): restored Windows external editor launch
Passed the cmd.exe /s /c command line through Bun verbatim so configured editors and temporary paths retain their quotes.

Added command-line regression coverage and documented the fix.

Fixes #8544
2026-08-14 11:27:13 +00:00
roboomp 3f5cb91068 fix(tui): swallow late DA responses for the whole session
The private-CSI reassembly gate and the DA1 swallow were both guarded by
`#da1SentinelOwners.length > 0`, so a Device-Attributes reply that arrived
after the startup capability-probe sentinel FIFO drained fell through to the
input handler and leaked into the composer as literal text (e.g.
`1;22;...;52c`). The extra latency of an SSH/zmx PTY chain makes the race
observable.

`CSI ? ... c` and split private-CSI responses are terminal->host reports,
never keystrokes, so they are now consumed regardless of whether a sentinel
is still outstanding.

Fixes #8542
2026-08-14 10:57:37 +00:00
roboomp 988ccc8268 fix(pi-natives): guard DeviceCheck token generation on GUI session
-[DCDevice isSupported] synchronously opens an XPC connection to the per-user DeviceCheck metadata daemon, which exists only in an interactive GUI login session. From a session without graphic access (SSH, launchd LaunchDaemon, CI runner, service account, sandbox) the connection setup hits _xpc_api_misuse and aborts the process with SIGTRAP before any completion handler runs, so the promise never rejects and every openai-codex/* OAuth model becomes unusable.

Check the caller's security session for the sessionHasGraphicAccess attribute via SessionGetInfo before touching DeviceCheck; resolve { supported: false, error } when it is absent, mirroring the non-macOS stub and letting the caller send an error-coded attestation instead of dying.

Fixes #8353
2026-08-14 08:49:26 +00:00
roboomp ff9c5189c9 docs: correct /hotkeys ctrl+d copy to match save-draft-and-exit
The /hotkeys table described app.exit (Ctrl+D) as "Exit (when editor is
empty)", implying readline/EOF-style conditional exit. The handler exits
unconditionally and snapshots the current prompt as a resumable draft
regardless of editor content (custom-editor.ts fires onExit for app.exit
with no empty check; input-controller.ts handleCtrlD calls shutdown()
unconditionally, which persists the draft). Corrected the line to
"Exit (saves current prompt as draft)".

Fixes #8530
2026-08-14 08:27:35 +00:00
roboomp 2996f16a61 fix(agent): added codex v2 compaction feature header
- Negotiated remote_compaction_v2 on Codex compatibility fetches.

- Covered explicit endpoints and non-Codex request scoping.

Fixes #8524
2026-08-14 06:56:57 +00:00
roboomp fc9d40ca30 fix(mnemopi): keep global rows recallable under channelId filter
buildWhere() appended a redundant hard `channel_id = ?` clause on top of
the `(session_id = ? OR scope = 'global' OR channel_id = ?)` visibility
clause. The hard AND nullified the `scope='global'` branch, so any global
row whose channel_id differed from the recall channelId — including rows
imported via importFromDict() with channel_id NULL — was silently dropped.

Channel isolation is fully preserved by the visibility OR-clause alone
(other-channel, non-global, cross-session rows still fail all three
disjuncts), so removing the hard clause restores global visibility without
leaking other channels.

Fixes #8525
2026-08-14 06:55:59 +00:00
roboomp 2d0eb6c41e fix(catalog): grant low/high/max to OpenRouter deepseek-v4-pro-0813
The OpenRouter non-Flash DeepSeek V4 effort override forced HIGH_ONLY for every id, so getModelDefinedEfforts clamped deepseek-v4-pro-0813 to high even though OpenRouter's /models advertises reasoning.supported_efforts [low,high,max] and the route accepts them. Carve out the dated SKU to the wire-exact low/high/max ladder while keeping the undated deepseek-v4-pro route high-only.

Fixes #8517
2026-08-14 06:18:34 +00:00
roboomp 83d08936ae fix(mcp): initialized sessions before opening sse stream
Moved the optional Streamable HTTP GET listener after the initialized notification so stateful servers do not terminate the session during setup.

Added regression coverage for a server that rejects pre-initialization GET traffic.

Fixes #8514
2026-08-14 05:33:38 +00:00
can1357 1e1ee2c330 test(coding-agent): updated model cache tests to resolve provider ids
- Import and use `resolveModelCacheProviderId` for github-copilot in model discovery and cache header tests.
2026-08-14 07:31:12 +02:00
can1357 a821f4316a fix(ai): sized usage requests by unfiltered account batch and updated cache methods
- Updated `RemoteAuthCredentialStore` to track broker usage accounts across snapshots and streams before account-pool filtering.
- Replaced `#countUsageAccounts` with dynamic tracking methods `#replaceBrokerUsageAccounts`, `#upsertBrokerUsageAccount`, and `#removeBrokerUsageAccount`.
- Refactored `AuthStorage.#fetchUsageCached` to accept an options object for `timeoutMs` and `forceRefresh`.
- Updated dockerignore patterns to exclude `**/.venv/` and ensure depth-agnostic `.env` secret exclusion.
2026-08-14 07:23:02 +02:00
can1357 7f56412423 Merge remote-tracking branch 'origin/farm/260d1f69/fix-alibaba-cn-quota-reporting' 2026-08-14 07:19:24 +02:00
can1357 ca583871c3 Merge remote-tracking branch 'origin/farm/73a063f1/fix-copilot-env-token-endpoint' 2026-08-14 07:18:42 +02:00
can1357 e47b0207ac feat(ai): scaled usage fetch timeout dynamically based on account counts
- Scale usage fetch timeout dynamically in AuthBrokerClient based on the maximum account count per provider.
- Track maximum usage accounts per provider in RemoteAuthCredentialStore snapshot applications.
- Add comprehensive wire and store tests covering serialized account batch timeouts and account pool sizing.
2026-08-14 07:18:17 +02:00
roboomp c0394ba53d fix(catalog): scope Copilot model cache by credential
Copilot discovery writes an authoritative cache, so online-if-uncached served the prior endpoint for the full TTL after COPILOT_GITHUB_TOKEN switched accounts. Keying the cache namespace on the credential forces fresh discovery for a new token instead of reusing a stale personal-endpoint cache.

Fixes #8507
2026-08-14 05:12:06 +00:00
can1357 ad318c7572 build: configured docker build pipelines for cargo native addons
- Switched Docker images to build native addons via cargo/napi-rs (`OMP_NATIVE_BUILD_BACKEND=cargo`) instead of Bazel.
- Updated Cargo.toml workspace members explicitly to prevent loading errors from stale directories under crates/.
- Added depth-agnostic patterns to .dockerignore files to exclude nested build outputs from Docker build contexts.
- Added OMP_NATIVE_CARGO_PROFILE environment variable to support configuring cargo profiles for addon builds.
2026-08-14 07:09:48 +02:00
can1357 ebcbdd5297 fix(ai): prevented stale ai usage cache re-plays during invalidation
- Added force-refresh tracking to serialize provider usage probes and prevent stale fallback re-plays after manual invalidation.
- Updated usage request handling to incorporate cache epochs and prevent stale in-flight results from overwriting new data.
- Added integration test verifying that broker invalidations correctly drop server-side last-good usage reports.
2026-08-14 07:05:41 +02:00
can1357 e5d59450c8 feat(ai): prevented usage cache from replaying stale values after invalidation
- Replace legacy credential-listing invalidation logic with prefix-based and exhaustive usage cache clearing.
- Update auth broker usage stale route to await storage cache invalidation.
- Add tests verifying explicit cache invalidation behavior prevents replaying last-good data on failure.
2026-08-14 06:54:26 +02:00
roboomp 335637de1e fix(ai): restored Beijing Token Plan quota reporting
- Routed Beijing credentials through the Bailian console session and usage endpoints.

- Added region-aware Cookie capture guidance and regression coverage.

Fixes #8509
2026-08-14 04:51:58 +00:00
roboomp ce65a40539 fix(catalog): bound Copilot endpoint probe with discovery timeout
Threaded the shared 10s discovery AbortSignal into the copilot_internal/user probe so a stalled endpoint falls back to the personal host instead of hanging startup or refresh.

Fixes #8507
2026-08-14 04:47:42 +00:00
roboomp c92ba97538 fix(catalog): discovered Copilot endpoint for env tokens
Shared the plan-endpoint probe between OAuth login and raw token model discovery so Business credentials route to their advertised API host.

Added regression coverage for the raw environment-token path.

Fixes #8507
2026-08-14 04:41:27 +00:00
can1357 039728ad80 chore: bump version to 17.3.3 2026-08-14 05:44:05 +02:00
can1357 f5911781c2 fix(hashline): recovered dangling range separators in hunk headers
- Recover dangling range separators in hunk headers as single-line ranges instead of rejecting them.
- Ensure strict rejection is maintained when a dangling separator is followed by invalid tokens.
2026-08-14 05:15:14 +02:00