@@ -2,6 +2,10 @@
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed `pi.registerProvider()` to honor per-model `baseUrl` overrides ([#4063](https://github.com/badlogic/pi-mono/issues/4063)).
|
||||
|
||||
## [0.71.1] - 2026-05-01
|
||||
|
||||
### Added
|
||||
|
||||
@@ -595,6 +595,9 @@ interface ProviderModelConfig {
|
||||
/** API type override for this specific model. */
|
||||
api?: Api;
|
||||
|
||||
/** API endpoint URL override for this specific model. */
|
||||
baseUrl?: string;
|
||||
|
||||
/** Whether the model supports extended thinking. */
|
||||
reasoning: boolean;
|
||||
|
||||
|
||||
@@ -1602,7 +1602,7 @@ pi.registerProvider("corporate-ai", {
|
||||
- `api` - API type: `"anthropic-messages"`, `"openai-completions"`, `"openai-responses"`, etc.
|
||||
- `headers` - Custom headers to include in requests.
|
||||
- `authHeader` - If true, adds `Authorization: Bearer` header automatically.
|
||||
- `models` - Array of model definitions. If provided, replaces all existing models for this provider.
|
||||
- `models` - Array of model definitions. If provided, replaces all existing models for this provider. Model definitions can set `baseUrl` to override the provider endpoint for that model.
|
||||
- `oauth` - OAuth provider config for `/login` support. When provided, the provider appears in the login menu.
|
||||
- `streamSimple` - Custom streaming implementation for non-standard APIs.
|
||||
|
||||
|
||||
@@ -1355,6 +1355,8 @@ export interface ProviderModelConfig {
|
||||
name: string;
|
||||
/** API type override for this model. */
|
||||
api?: Api;
|
||||
/** API endpoint URL override for this model. */
|
||||
baseUrl?: string;
|
||||
/** Whether the model supports extended thinking. */
|
||||
reasoning: boolean;
|
||||
/** Supported input types. */
|
||||
|
||||
@@ -876,7 +876,7 @@ export class ModelRegistry {
|
||||
name: modelDef.name,
|
||||
api: api as Api,
|
||||
provider: providerName,
|
||||
baseUrl: config.baseUrl!,
|
||||
baseUrl: modelDef.baseUrl ?? config.baseUrl!,
|
||||
reasoning: modelDef.reasoning,
|
||||
input: modelDef.input as ("text" | "image")[],
|
||||
cost: modelDef.cost,
|
||||
|
||||
Reference in New Issue
Block a user