test: align codexShim test with strict schema normalization

Update the stale test expectation to match current behavior where
normalizeSchemaForOpenAI() promotes all properties into required[]
and marks the schema as strict: true.

Same fix as PR #72 — included here so PR #80 passes CI independently.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
gnanam1990
2026-04-02 08:16:51 +05:30
parent 4c9b9f0d5d
commit ac2ea6aeb2

View File

@@ -72,7 +72,7 @@ describe('Codex provider config', () => {
})
describe('Codex request translation', () => {
test('disables strict mode for tools with optional parameters', () => {
test('normalizes optional parameters into strict Responses schemas', () => {
const tools = convertToolsToResponsesTools([
{
name: 'Agent',
@@ -102,9 +102,10 @@ describe('Codex request translation', () => {
prompt: { type: 'string' },
subagent_type: { type: 'string' },
},
required: ['description', 'prompt'],
required: ['description', 'prompt', 'subagent_type'],
additionalProperties: false,
},
strict: true,
},
])
})