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 |
||
|---|---|---|
| .. | ||
| scripts | ||
| src | ||
| package.json | ||
| pnpm-lock.yaml | ||
| tsconfig.json | ||