mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-24 02:02:42 +00:00
fix(providers): align custom provider example with generated config
Correct the documented internal provider key and simplify import filtering while preserving native and legacy session selection.
This commit is contained in:
@@ -260,9 +260,9 @@ Paseo passes those variables through to the Codex app-server process **and** map
|
||||
Under the hood, for each custom Codex provider Paseo injects this into Codex's config:
|
||||
|
||||
```toml
|
||||
model_provider = "my-codex"
|
||||
model_provider = "paseo:my-codex"
|
||||
|
||||
[model_providers.my-codex]
|
||||
[model_providers."paseo:my-codex"]
|
||||
name = "My Codex"
|
||||
base_url = "https://custom-relay.example.com/v1"
|
||||
wire_api = "responses"
|
||||
|
||||
@@ -7364,16 +7364,17 @@ export class CodexAppServerAgentClient implements AgentClient {
|
||||
// unless told otherwise, lists only the provider its own config selects.
|
||||
// Include legacy custom ids, but keep Codex built-in sessions separate.
|
||||
const customProviderConfig = this.customProviderConfig();
|
||||
let modelProviders: string[] | undefined;
|
||||
if (customProviderConfig && this.deps.customProvider) {
|
||||
modelProviders = [customProviderConfig.model_provider];
|
||||
if (!CODEX_BUILTIN_MODEL_PROVIDER_IDS.has(this.deps.customProvider.id)) {
|
||||
modelProviders.push(this.deps.customProvider.id);
|
||||
}
|
||||
}
|
||||
const allThreads = await readCodexThreadWindow(client, this.logger, {
|
||||
limit: listLimit,
|
||||
cwd: options?.cwd,
|
||||
...(customProviderConfig && this.deps.customProvider
|
||||
? {
|
||||
modelProviders: CODEX_BUILTIN_MODEL_PROVIDER_IDS.has(this.deps.customProvider.id)
|
||||
? [customProviderConfig.model_provider]
|
||||
: [customProviderConfig.model_provider, this.deps.customProvider.id],
|
||||
}
|
||||
: {}),
|
||||
...(modelProviders ? { modelProviders } : {}),
|
||||
});
|
||||
const threads = filterCodexThreadsByCwd(allThreads, options?.cwd);
|
||||
return threads.slice(0, limit).map((thread) => {
|
||||
|
||||
Reference in New Issue
Block a user