fix(openai): preserve suppression base urls · openclaw/openclaw@6e8982f
VACInc
·
2026-06-15
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -125,6 +125,7 @@ function resolveBuiltInModelSuppression(params: {
|
125 | 125 | export function shouldSuppressBuiltInModelFromManifest(params: { |
126 | 126 | provider?: string | null; |
127 | 127 | id?: string | null; |
| 128 | +baseUrl?: string | null; |
128 | 129 | config?: OpenClawConfig; |
129 | 130 | workspaceDir?: string; |
130 | 131 | }) { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -71,6 +71,7 @@ function loadAvailableModels(
|
71 | 71 | ? !shouldSuppressBuiltInModelFromManifest({ |
72 | 72 | provider: model.provider, |
73 | 73 | id: model.id, |
| 74 | +baseUrl: model.baseUrl, |
74 | 75 | config: cfg, |
75 | 76 | }) |
76 | 77 | : !shouldSuppressBuiltInModel({ |
@@ -113,6 +114,7 @@ export async function loadModelRegistry(
|
113 | 114 | : !shouldSuppressBuiltInModelFromManifest({ |
114 | 115 | provider: model.provider, |
115 | 116 | id: model.id, |
| 117 | +baseUrl: model.baseUrl, |
116 | 118 | config: cfg, |
117 | 119 | }), |
118 | 120 | ); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -74,6 +74,7 @@ describe("appendProviderCatalogRows", () => {
|
74 | 74 | expect(mocks.shouldSuppressBuiltInModelFromManifest).toHaveBeenCalledWith({ |
75 | 75 | provider: "codex", |
76 | 76 | id: "gpt-5.5", |
| 77 | +baseUrl: "https://chatgpt.com/backend-api", |
77 | 78 | config: { |
78 | 79 | agents: { defaults: { model: { primary: "codex/gpt-5.5" } } }, |
79 | 80 | models: { providers: {} }, |
@@ -128,6 +129,7 @@ describe("appendProviderCatalogRows", () => {
|
128 | 129 | expect(mocks.shouldSuppressBuiltInModelFromManifest).toHaveBeenCalledWith({ |
129 | 130 | provider: "openai", |
130 | 131 | id: "gpt-5.3-codex-spark", |
| 132 | +baseUrl: "https://api.openai.com/v1", |
131 | 133 | config: { |
132 | 134 | agents: { defaults: { model: { primary: "openai/gpt-5.5" } } }, |
133 | 135 | models: { providers: {} }, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -126,6 +126,7 @@ function shouldSuppressListModel(params: {
|
126 | 126 | return shouldSuppressBuiltInModelFromManifest({ |
127 | 127 | provider: params.model.provider, |
128 | 128 | id: params.model.id, |
| 129 | +baseUrl: params.model.baseUrl, |
129 | 130 | config: params.context.cfg, |
130 | 131 | }); |
131 | 132 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。