singularity-forge/packages/pi-coding-agent
Vojtěch Šplíchal d56842ab7a fix(model-registry): scope custom provider stream handlers to prevent clobbering built-in API handlers
When a custom provider (e.g. claude-code-cli) registers a streamSimple
handler with the same api type as a built-in (e.g. 'anthropic-messages'),
the global API provider registry was overwritten, routing ALL models of
that api type through the custom handler.

This caused anthropic/claude-opus-4-6 requests to be dispatched through
the Claude Code SDK subprocess instead of the Anthropic API, resulting
in 'Tool not found' errors for Glob, Read, Edit, Bash (SDK tool names
not present in pi's tool registry).

Fix: wrap the registered handler with a model.provider guard so it only
fires for models from the registering provider, delegating to the
previous handler for all other providers.

Closes #2536
2026-03-25 22:33:48 +01:00
..
scripts fix: handle Windows non-ASCII paths in cpSync with copyFileSync fallback (#1181) 2026-03-18 10:13:37 -06:00
src fix(model-registry): scope custom provider stream handlers to prevent clobbering built-in API handlers 2026-03-25 22:33:48 +01:00
package.json release: v2.47.0 2026-03-25 19:53:13 +00:00
pnpm-lock.yaml fix: type errors in claude-import.ts and marketplace-discovery.ts 2026-03-16 14:46:31 -04:00
tsconfig.json feat: vendor Pi source into workspace monorepo 2026-03-12 21:55:17 -06:00