Cindy AI Gateway IDs deepseek/deepseek-v4.1-flash and deepseek/deepseek-flash had no
DeepSeek compat row, and the loopback URL defeats Pi's deepseek.com detection. Pi therefore
sent `developer`, `max_completion_tokens`, `store` and no `thinking` toggle, so turning
thinking off left it on. Map every Flash alias to Pi 1.4's `deepseek-flash` row and keep V4 Pro
on its own row.
Teach the bundled-catalog reader Pi 1.x's lazy shard layout (chat rows only) and merge the
Pi 1.4.0 DeepSeek rows into provider-models.json, so DeepSeek direct, OpenRouter, Bailian
Token Plan and the other relays get current compat, efforts, image input and prices. Rows whose
endpoint moved (OpenCode Zen/Go) are left for the Pi pin bump.
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Publish safely owned keep sentinels for old owner profiles, retain them until every shared borrower has drained source I/O, and retry terminal cleanup through existing release intents. Retry transient ripgrep release asset failures before falling back to CDN.
Signed-off-by: JiangJiahao <jiangjiahao@xd.com>
* feat(providers): unify imports and native harness defaults
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): preserve OAuth pricing and account-specific routing
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): pair native APIs with endpoints and preserve import defaults
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): retain native auth and SDK connection probes
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): preserve template routes when editing connections
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): lock fixed template connection endpoints
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): drop duplicate model-compat lockfile importer
Merging main duplicated the packages/model-compat importer and broke
pnpm frozen installs in CI.
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): keep OAuth save and reasoning state per connection
Closing the wizard while finish is in flight no longer deletes the
account being saved. Claude Code reasoning blobs are namespaced by
connection id, not only the shared upstream URL.
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): keep OAuth quotes and drop stale request paths
Generic OAuth discovery prices now publish under the connection for
usage estimates. Changing a model protocol no longer reuses the
previous exact request path.
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): skip Google embed models and retired siblings
Google discovery now requires generateContent, so embedding-only
models stay out of chat runtimes. Catalog native API lookup no longer
lets a retired variant suppress the active identity.
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): allow empty OAuth scopes and static Pi adapters
Preset OAuth connections can keep an empty scope string so provider
defaults still apply. Desktop Main now loads Pi native adapters with
top-level imports instead of runtime import().
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): register proxy OAuth adapters for Pi
Copilot OAuth connections already declare a native adapter identity, but
the Pi spawn list required an API key env. Register those aliases even
when credentials stay on the local proxy.
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* test(providers): type Copilot OAuth fixture API for desktop typecheck
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): keep OAuth recommendations and copy account slots
OAuth login now treats omitted defaultEnabled as selected, matching the
API key picker. Editing one templated endpoint fills the other engines
instead of leaving leftover placeholders.
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): persist checked models and Google import/copy
Wizard saves explicit defaultEnabled for checked models so compat
slots stay on. Deep-link import and runtime copy accept Google and
the other Claude Code wires.
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): keep explicit defaultEnabled on imported models
Deep-link import now stores defaultEnabled true as well as false, so a
compatibility runtime enabled by the sender stays enabled after import.
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): do not let adhoc Vertex probes inherit host ADC
Renderer-chosen google-vertex and Bedrock probes cannot use Desktop
environment credentials against an unrelated host. Saved connections and
user-supplied keys still work.
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): dispatch implicit Claude Google routes
The implicit resolver already returned google-generative-ai connections,
but dispatch still dropped that wire during the session-binding race.
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): skip Vercel image rows and bound native error bodies
Chat import cannot execute Vercel type=image models, so they no longer
appear then vanish. Native adapter error clones now read a prefix only.
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): drop OAuth tokens when runtime endpoints change
A renderer that can edit a saved OAuth connection must not keep the
logged-in token after baseUrl or modelsUrl moves to another host.
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): keep checked models, remote Claude wires, and OAuth headers
Persist explicit defaultEnabled, refuse non-Messages remote Claude routes,
forward saved OAuth headers on refresh, and stop saved Vertex probes from
inheriting Desktop ADC against unapproved hosts.
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): keep Bedrock probes on approved hosts
Dummy API keys must not let Bedrock inherit Desktop IAM against an
untrusted URL. Mobile session controls now import identity without the
Desktop provider catalog.
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): keep Cloudflare header-only credentials
Do not overwrite a saved cf-aig-authorization header with an empty
Bearer token during probes, Claude/Codex bridges, or Pi adapters.
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): bind Bedrock execution to approved endpoints
Connection probes already refused host IAM against untrusted URLs.
Claude/Codex turns now use the same Main-approved endpoint check
before the native SDK can sign with Desktop credentials.
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): keep Cloudflare headers and skip remote OAuth Pi
Native Claude/Codex bridges no longer invent a fake API key that
overwrites header-only Cloudflare credentials. Remote Pi also no
longer rewrites OAuth connections onto the Desktop loopback proxy.
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(providers): keep checked models and Pi host-credential guards
Connection edits now persist explicit defaultEnabled. Pi skips Bedrock
destinations that are not Main-approved, and placeholder keys no longer
overwrite Cloudflare header-only credentials.
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
---------
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Co-authored-by: Chris <4436110+zqchris@users.noreply.github.com>
* fix(proxy): compact oversized vision history before forwarding
Signed-off-by: david <david@xd.com>
* fix(proxy): compact oversized local requests safely
Signed-off-by: david <david@xd.com>
* docs(proxy): clarify vision compaction order
Signed-off-by: david <david@xd.com>
* fix(proxy): compact OpenAI Chat image history
Signed-off-by: david <david@xd.com>
---------
Signed-off-by: david <david@xd.com>
P1 follow-up to the per-file-hash change on PR #1265. verifyDirDistManifest only iterated
manifest.files, so extra files/symlinks in the dist dir (stale build residue, local pollution)
were never compared against the actual directory contents — verify still returned true,
ensure-agent-binaries skipped the refresh, and stagePi copied the whole directory (including
unverified extra bytes) into the installer. verify now recursively enumerates the directory and
requires the actual set to match the manifest exactly: an extra regular file, a count mismatch,
or any symlink/non-regular entry (a pollution vector writeDirDistManifest never records) fails
verification.
Adds coverage: stray top-level file, stray nested file, and recovery after removal. Full
pnpm test:unit green.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Two more review follow-ups on PR #1265:
- tools/shared/dir-dist-manifest.mjs: the dir-dist manifest recorded and compared only
file sizes, so a corrupted or replaced Pi executable/sibling asset of the same byte
length passed the cache/package gate used by both tools/pi/update.mjs and
scripts/ensure-agent-binaries.mjs. writeDirDistManifest now records a sha256 per file
and verifyDirDistManifest re-hashes and compares them (fail-closed: a size-only legacy
manifest is treated as untrusted and forces a re-download). Complements the archive
digest pin from the earlier fix.
- sessionTaskSummary.ts: the task-summary one-shot fallback called
getMaker().oneShot(session.agentKind, ...) directly, so a pinned Pi session threw
(PiAgent has no oneShot) and the summary was silently left unset. It now skips the
fallback for agents that can't one-shot. Extracted a shared agentSupportsOneShot()
predicate in oneShotCandidates.ts and reused it in help.ts (replacing its local set)
so both one-shot fallbacks share one source of truth.
Adds coverage: same-length tamper and size-only manifests are rejected. Full
`pnpm test:unit` green; desktop typecheck clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Four review follow-ups on PR #1265:
- tools/pi/update.mjs: bind the verified archive digest to each platform cache
(.asset-digest.bin) and re-verify it against the current upstream asset digest
on both the same-version fast path and downloadAsset's skip branch. Previously a
same-tag asset swap (digest changes, version unchanged) would promote the stale
cache while saveCache wrote the new pin, shipping a runtime inconsistent with the
committed digest pin. Missing marker (pre-existing cache) => re-download once.
- help.ts: exclude agents without oneShot from the help fallback. PiAgent inherits
BaseAgent's not-implemented oneShot, so selecting Pi (most-recent / only-available)
made HELP_ASK and the pinned-task summary return no-answer even when Claude/Codex
fallback was usable. Gated in pickHelpAgent (covers both call paths).
- usageAnalyzer.ts: route explicitly by agentKind instead of sending every
non-Claude record to handleCodexRecord. Pi's native transcript (type:'message' +
message.role) differs from Codex's event_msg/payload, so mis-routing produced
wrongly-attributed exposures. Pi is now explicitly skipped (native Pi usage
discovery/parsing is a separate follow-up) rather than silently mis-parsed.
- CCAgentSessionView.tsx: use the tri-valued agent mapping when repairing a stale
vendor model, so a Pi session falls back to the Pi catalog default instead of
being rewritten to the CC top model (potentially the pricier Opus).
Adds unit coverage for each: digest-pin re-verification, Pi help skip, Pi usage
skip, and the Pi fallback path. Full `pnpm test:unit` green; desktop typecheck clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>