feat: custom provider support with streamSimple
- Add resetApiProviders() to clear and re-register built-in providers - Add createAssistantMessageEventStream() factory for extensions - Add streamSimple support in ProviderConfig for custom API implementations - Call resetApiProviders() on /reload to clean up extension providers - Add custom-provider.md documentation - Add custom-provider.ts example with full Anthropic implementation - Update extensions.md with streamSimple config option
This commit is contained in:
@@ -1206,6 +1206,9 @@ pi.registerProvider("corporate-ai", {
|
||||
- `authHeader` - If true, adds `Authorization: Bearer` header automatically.
|
||||
- `models` - Array of model definitions. If provided, replaces all existing models for this provider.
|
||||
- `oauth` - OAuth provider config for `/login` support. When provided, the provider appears in the login menu.
|
||||
- `streamSimple` - Custom streaming implementation for non-standard APIs.
|
||||
|
||||
See [custom-provider.md](custom-provider.md) for advanced topics: custom streaming APIs, OAuth details, model definition reference.
|
||||
|
||||
## State Management
|
||||
|
||||
|
||||
Reference in New Issue
Block a user