Skip to content

Commit 8736a25

Browse files
fihaaadeclaude
andcommitted
fix(schema): keep openai-compatible compatibility flags from config
Model.Compatibility omitted supportsStore, supportsUsageInStreaming, and supportsStrictMode, so config decoding dropped them even though the openai-chat protocol honors them. Strict gateways that reject `store` could not be configured. Fixes anomalyco#52617 Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 82833da commit 8736a25

4 files changed

Lines changed: 33 additions & 0 deletions

File tree

‎packages/client/src/promise/generated/types.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,9 @@ export type ModelCompatibility = {
633633
maxTokensField?: ModelMaxTokensField
634634
requireFinishReason?: boolean
635635
requireAssistantAfterTool?: boolean
636+
supportsStore?: boolean
637+
supportsUsageInStreaming?: boolean
638+
supportsStrictMode?: boolean
636639
supportsPromptCacheKey?: boolean
637640
cacheFormat?: ModelCacheFormat
638641
supportsThinkingBlockBinding?: boolean
@@ -645,6 +648,9 @@ export type ProviderCompatibility = {
645648
maxTokensField?: ModelMaxTokensField
646649
requireFinishReason?: boolean
647650
requireAssistantAfterTool?: boolean
651+
supportsStore?: boolean
652+
supportsUsageInStreaming?: boolean
653+
supportsStrictMode?: boolean
648654
supportsPromptCacheKey?: boolean
649655
cacheFormat?: ModelCacheFormat
650656
}

‎packages/core/test/config/provider.test.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,9 @@ describe("ConfigProviderPlugin.Plugin", () => {
802802
requireFinishReason: false,
803803
supportsEffortUpdates: false,
804804
supportsThinkingBlockBinding: false,
805+
supportsStore: false,
806+
supportsUsageInStreaming: false,
807+
supportsStrictMode: false,
805808
},
806809
capabilities: { tools: true, input: ["text"], output: ["text"] },
807810
disabled: true,
@@ -902,6 +905,9 @@ describe("ConfigProviderPlugin.Plugin", () => {
902905
requireFinishReason: false,
903906
supportsEffortUpdates: false,
904907
supportsThinkingBlockBinding: false,
908+
supportsStore: false,
909+
supportsUsageInStreaming: false,
910+
supportsStrictMode: false,
905911
})
906912
expect(model.capabilities).toEqual({ tools: true, input: ["text"], output: ["text"] })
907913
expect(model.enabled).toBe(false)

‎packages/protocol/openapi.json‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16644,6 +16644,15 @@
1664416644
"requireAssistantAfterTool": {
1664516645
"type": "boolean"
1664616646
},
16647+
"supportsStore": {
16648+
"type": "boolean"
16649+
},
16650+
"supportsUsageInStreaming": {
16651+
"type": "boolean"
16652+
},
16653+
"supportsStrictMode": {
16654+
"type": "boolean"
16655+
},
1664716656
"supportsPromptCacheKey": {
1664816657
"type": "boolean"
1664916658
},
@@ -17746,6 +17755,15 @@
1774617755
"requireAssistantAfterTool": {
1774717756
"type": "boolean"
1774817757
},
17758+
"supportsStore": {
17759+
"type": "boolean"
17760+
},
17761+
"supportsUsageInStreaming": {
17762+
"type": "boolean"
17763+
},
17764+
"supportsStrictMode": {
17765+
"type": "boolean"
17766+
},
1774917767
"supportsPromptCacheKey": {
1775017768
"type": "boolean"
1775117769
},

‎packages/schema/src/model-compatibility.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ export const Compatibility = Schema.Struct({
2424
maxTokensField: MaxTokensField.pipe(optional),
2525
requireFinishReason: Schema.Boolean.pipe(optional),
2626
requireAssistantAfterTool: Schema.Boolean.pipe(optional),
27+
supportsStore: Schema.Boolean.pipe(optional),
28+
supportsUsageInStreaming: Schema.Boolean.pipe(optional),
29+
supportsStrictMode: Schema.Boolean.pipe(optional),
2730
supportsPromptCacheKey: Schema.Boolean.pipe(optional),
2831
/** Prompt-cache marker syntax the endpoint accepts. Overrides the route default; both send `cache_control`, and `alibaba` skips tool definitions. */
2932
cacheFormat: CacheFormat.pipe(optional),

0 commit comments

Comments
 (0)