



























@@ -10,7 +10,15 @@ coverage:
1010secondary:
1111 - models.switching
1212 - runtime.session-continuity
13-objective: Verify /think lists provider-owned levels and remaps stored thinking levels when /model changes provider capabilities.
13+objective: Verify /think lists provider-owned levels and remaps stored thinking levels when the session model changes provider capabilities.
14+plugins:
15+ - anthropic
16+gatewayConfigPatch:
17+agents:
18+defaults:
19+models:
20+anthropic/claude-sonnet-4-6:
21+params: {}
1422successCriteria:
1523 - Anthropic Claude Sonnet 4.6 advertises adaptive but not OpenAI-only xhigh or Opus max.
1624 - A stored adaptive level remaps to medium when switching to OpenAI GPT-5.4.
@@ -35,7 +43,8 @@ execution:
3543anthropicModelRef: anthropic/claude-sonnet-4-6
3644openAiXhighModelRef: openai/gpt-5.4
3745noXhighModelRef: anthropic/claude-sonnet-4-6
38-conversationId: qa-thinking-slash-remap
46+conversationId: thinking-slash-remap
47+sessionKey: agent:qa:main
3948```
40494150```yaml qa-flow
@@ -55,25 +64,9 @@ steps:
5564expr: "env.providerMode === config.requiredProviderMode"
5665message:
5766expr: "`thinking remap scenario requires ${config.requiredProviderMode}; got ${env.providerMode}`"
58- - set: cursor
67+ - set: anthropicModelAck
5968value:
60-expr: state.getSnapshot().messages.length
61- - call: state.addInboundMessage
62-args:
63- - conversation:
64-id:
65-expr: config.conversationId
66-kind: direct
67-senderId: qa-operator
68-senderName: QA Operator
69-text:
70-expr: "`/model ${config.anthropicModelRef}`"
71- - call: waitForCondition
72-saveAs: anthropicModelAck
73-args:
74- - lambda:
75-expr: "state.getSnapshot().messages.slice(cursor).filter((candidate) => candidate.direction === 'outbound' && candidate.conversation.id === config.conversationId && candidate.text.includes(`Model set to ${config.anthropicModelRef}`)).at(-1)"
76- - expr: liveTurnTimeoutMs(env, 20000)
69+expr: "await env.gateway.call('sessions.patch', { key: config.sessionKey, model: config.anthropicModelRef }, { timeoutMs: liveTurnTimeoutMs(env, 45000) })"
7770 - set: cursor
7871value:
7972expr: state.getSnapshot().messages.length
@@ -100,7 +93,7 @@ steps:
10093expr: "!/Options: .*\\bxhigh\\b/i.test(anthropicThinkStatus.text) && !/Options: .*\\bmax\\b/i.test(anthropicThinkStatus.text)"
10194message:
10295expr: "`expected Sonnet /think options to omit xhigh/max, got ${anthropicThinkStatus.text}`"
103-detailsExpr: "`model=${anthropicModelAck.text}; think=${anthropicThinkStatus.text}`"
96+detailsExpr: "`model=${JSON.stringify(anthropicModelAck.resolved)}; think=${anthropicThinkStatus.text}`"
10497 - name: maps adaptive to medium when switching to OpenAI
10598actions:
10699 - set: cursor
@@ -121,29 +114,13 @@ steps:
121114 - lambda:
122115expr: "state.getSnapshot().messages.slice(cursor).filter((candidate) => candidate.direction === 'outbound' && candidate.conversation.id === config.conversationId && /Thinking level set to adaptive/i.test(candidate.text)).at(-1)"
123116 - expr: liveTurnTimeoutMs(env, 20000)
124- - set: cursor
117+ - set: openAiModelAck
125118value:
126-expr: state.getSnapshot().messages.length
127- - call: state.addInboundMessage
128-args:
129- - conversation:
130-id:
131-expr: config.conversationId
132-kind: direct
133-senderId: qa-operator
134-senderName: QA Operator
135-text:
136-expr: "`/model ${config.openAiXhighModelRef}`"
137- - call: waitForCondition
138-saveAs: openAiModelAck
139-args:
140- - lambda:
141-expr: "state.getSnapshot().messages.slice(cursor).filter((candidate) => candidate.direction === 'outbound' && candidate.conversation.id === config.conversationId && candidate.text.includes(config.openAiXhighModelRef) && /Model (set to|reset to default)/i.test(candidate.text)).at(-1)"
142- - expr: liveTurnTimeoutMs(env, 20000)
119+expr: "await env.gateway.call('sessions.patch', { key: config.sessionKey, model: config.openAiXhighModelRef }, { timeoutMs: liveTurnTimeoutMs(env, 45000) })"
143120 - assert:
144-expr: "/Thinking level set to medium \\(adaptive not supported for openai\\/gpt-5\\.4\\)/i.test(openAiModelAck.text)"
121+expr: "openAiModelAck.entry?.thinkingLevel === 'medium'"
145122message:
146-expr: "`expected adaptive->medium remap, got ${openAiModelAck.text}`"
123+expr: "`expected adaptive->medium remap, got ${JSON.stringify(openAiModelAck.entry)}`"
147124 - set: cursor
148125value:
149126expr: state.getSnapshot().messages.length
@@ -166,7 +143,7 @@ steps:
166143expr: "/Options: .*\\bxhigh\\b/i.test(openAiThinkStatus.text) && !/Options: .*\\badaptive\\b/i.test(openAiThinkStatus.text) && !/Options: .*\\bmax\\b/i.test(openAiThinkStatus.text)"
167144message:
168145expr: "`expected OpenAI GPT-5.4 /think options to include xhigh only, got ${openAiThinkStatus.text}`"
169-detailsExpr: "`adaptive=${adaptiveAck.text}; switch=${openAiModelAck.text}; think=${openAiThinkStatus.text}`"
146+detailsExpr: "`adaptive=${adaptiveAck.text}; switch=${JSON.stringify(openAiModelAck.resolved)}; think=${openAiThinkStatus.text}`"
170147 - name: maps xhigh to high on a model without xhigh
171148actions:
172149 - set: cursor
@@ -187,29 +164,13 @@ steps:
187164 - lambda:
188165expr: "state.getSnapshot().messages.slice(cursor).filter((candidate) => candidate.direction === 'outbound' && candidate.conversation.id === config.conversationId && /Thinking level set to xhigh/i.test(candidate.text)).at(-1)"
189166 - expr: liveTurnTimeoutMs(env, 20000)
190- - set: cursor
167+ - set: noXhighModelAck
191168value:
192-expr: state.getSnapshot().messages.length
193- - call: state.addInboundMessage
194-args:
195- - conversation:
196-id:
197-expr: config.conversationId
198-kind: direct
199-senderId: qa-operator
200-senderName: QA Operator
201-text:
202-expr: "`/model ${config.noXhighModelRef}`"
203- - call: waitForCondition
204-saveAs: noXhighModelAck
205-args:
206- - lambda:
207-expr: "state.getSnapshot().messages.slice(cursor).filter((candidate) => candidate.direction === 'outbound' && candidate.conversation.id === config.conversationId && candidate.text.includes(config.noXhighModelRef) && /Model (set to|reset to default)/i.test(candidate.text)).at(-1)"
208- - expr: liveTurnTimeoutMs(env, 20000)
169+expr: "await env.gateway.call('sessions.patch', { key: config.sessionKey, model: config.noXhighModelRef }, { timeoutMs: liveTurnTimeoutMs(env, 45000) })"
209170 - assert:
210-expr: "/Thinking level set to high \\(xhigh not supported for anthropic\\/claude-sonnet-4-6\\)/i.test(noXhighModelAck.text)"
171+expr: "noXhighModelAck.entry?.thinkingLevel === 'high'"
211172message:
212-expr: "`expected xhigh->high remap, got ${noXhighModelAck.text}`"
173+expr: "`expected xhigh->high remap, got ${JSON.stringify(noXhighModelAck.entry)}`"
213174 - set: cursor
214175value:
215176expr: state.getSnapshot().messages.length
@@ -232,5 +193,5 @@ steps:
232193expr: "/Options: .*\\badaptive\\b/i.test(noXhighThinkStatus.text) && !/Options: .*\\bxhigh\\b/i.test(noXhighThinkStatus.text) && !/Options: .*\\bmax\\b/i.test(noXhighThinkStatus.text)"
233194message:
234195expr: "`expected non-xhigh model /think options to include adaptive and omit xhigh/max, got ${noXhighThinkStatus.text}`"
235-detailsExpr: "`xhigh=${xhighAck.text}; switch=${noXhighModelAck.text}; think=${noXhighThinkStatus.text}`"
196+detailsExpr: "`xhigh=${xhighAck.text}; switch=${JSON.stringify(noXhighModelAck.resolved)}; think=${noXhighThinkStatus.text}`"
236197```
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。