feat: declare openai catalog suppressions · openclaw/openclaw@03c4c31
shakkernerd
·
2026-04-28
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -41,6 +41,31 @@
|
41 | 41 | } |
42 | 42 | } |
43 | 43 | }, |
| 44 | +"modelCatalog": { |
| 45 | +"aliases": { |
| 46 | +"azure-openai-responses": { |
| 47 | +"provider": "openai", |
| 48 | +"api": "azure-openai-responses" |
| 49 | + } |
| 50 | + }, |
| 51 | +"suppressions": [ |
| 52 | + { |
| 53 | +"provider": "openai", |
| 54 | +"model": "gpt-5.3-codex-spark", |
| 55 | +"reason": "gpt-5.3-codex-spark is no longer exposed by the OpenAI or Codex catalogs. Use openai/gpt-5.5." |
| 56 | + }, |
| 57 | + { |
| 58 | +"provider": "azure-openai-responses", |
| 59 | +"model": "gpt-5.3-codex-spark", |
| 60 | +"reason": "gpt-5.3-codex-spark is no longer exposed by the OpenAI or Codex catalogs. Use openai/gpt-5.5." |
| 61 | + }, |
| 62 | + { |
| 63 | +"provider": "openai-codex", |
| 64 | +"model": "gpt-5.3-codex-spark", |
| 65 | +"reason": "gpt-5.3-codex-spark is no longer exposed by the OpenAI or Codex catalogs. Use openai/gpt-5.5." |
| 66 | + } |
| 67 | + ] |
| 68 | + }, |
44 | 69 | "cliBackends": ["codex-cli"], |
45 | 70 | "providerAuthEnvVars": { |
46 | 71 | "openai": ["OPENAI_API_KEY"] |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1102,6 +1102,9 @@ export function resolveProviderBuiltInModelSuppression(params: {
|
1102 | 1102 | env?: NodeJS.ProcessEnv; |
1103 | 1103 | context: ProviderBuiltInModelSuppressionContext; |
1104 | 1104 | }) { |
| 1105 | +// Deprecated compatibility fallback. Static suppression rules should live in |
| 1106 | +// manifest modelCatalog.suppressions so list/model resolution can answer |
| 1107 | +// without loading provider runtime. |
1105 | 1108 | for (const plugin of resolveProviderPluginsForCatalogHooks(params)) { |
1106 | 1109 | const result = plugin.suppressBuiltInModel?.(params.context); |
1107 | 1110 | if (result?.suppress) { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -966,11 +966,11 @@ export type ProviderBuildUnknownModelHintContext = {
|
966 | 966 | }; |
967 | 967 | |
968 | 968 | /** |
969 | | - * Built-in model suppression hook. |
| 969 | + * Built-in model suppression hook context. |
970 | 970 | * |
971 | | - * Use this when a provider/plugin needs to hide stale upstream catalog rows or |
972 | | - * replace them with a vendor-specific hint. This hook is consulted by model |
973 | | - * resolution, model listing, and catalog loading. |
| 971 | + * @deprecated Use manifest `modelCatalog.suppressions` for static suppression |
| 972 | + * rules. Runtime suppression hooks remain as compatibility fallback for |
| 973 | + * plugins that cannot express a rule declaratively yet. |
974 | 974 | */ |
975 | 975 | export type ProviderBuiltInModelSuppressionContext = { |
976 | 976 | config?: OpenClawConfig; |
@@ -1480,6 +1480,10 @@ export type ProviderPlugin = {
|
1480 | 1480 | * Return `{ suppress: true }` to hide a stale upstream row. Include |
1481 | 1481 | * `errorMessage` when OpenClaw should surface a provider-specific hint for |
1482 | 1482 | * direct model resolution failures. |
| 1483 | + * |
| 1484 | + * @deprecated Use manifest `modelCatalog.suppressions` for static suppression |
| 1485 | + * rules. Runtime suppression hooks remain as compatibility fallback for |
| 1486 | + * plugins that cannot express a rule declaratively yet. |
1483 | 1487 | */ |
1484 | 1488 | suppressBuiltInModel?: ( |
1485 | 1489 | ctx: ProviderBuiltInModelSuppressionContext, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。