Skip to content

fix(openai): reinforce structured output for Claude proxies - #3863

Merged
dgageot merged 1 commit into
mainfrom
fix/3840-copilot-claude-structured-output
Jul 28, 2026
Merged

fix(openai): reinforce structured output for Claude proxies#3863
dgageot merged 1 commit into
mainfrom
fix/3840-copilot-claude-structured-output

Conversation

@Sayt-0

@Sayt-0 Sayt-0 commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary

  • reinforce structured output for Claude models served through OpenAI-compatible endpoints
  • retain native JSON-schema request fields while adding the schema and raw-JSON constraints to leading system instructions
  • preserve existing messages and tool configuration across Chat Completions, Responses API, Copilot, and models gateway paths

Issue

Related to #3840.

Validation

  • task lint
  • task build
  • task test (with operator-injected HTTP proxy variables unset; those variables otherwise break unrelated SSRF tests)
  • go test -race ./pkg/model/provider/openai/...
  • go test ./pkg/evaluation/...

Reproduction status

The failing request shape was confirmed: Claude received response_format.json_schema without equivalent JSON constraints in the prompt. Exact end-to-end reproduction remained blocked in the available environment because github-copilot/claude-opus-4.8 returned a model-access error before generation.

@Sayt-0
Sayt-0 marked this pull request as ready for review July 28, 2026 13:56
@Sayt-0
Sayt-0 requested a review from a team as a code owner July 28, 2026 13:56
@aheritier aheritier added area/providers/openai For features/issues/fixes related to the usage of OpenAI models kind/fix PR fixes a bug (maps to fix:). Use on PRs only. labels Jul 28, 2026
@dgageot
dgageot merged commit 508566b into main Jul 28, 2026
15 checks passed
@dgageot
dgageot deleted the fix/3840-copilot-claude-structured-output branch July 28, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/providers/openai For features/issues/fixes related to the usage of OpenAI models kind/fix PR fixes a bug (maps to fix:). Use on PRs only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants