Skip to content

fix(openai): port reasoning parameter guard across runtimes - #589

Open
Jasper (TPSJASPER) wants to merge 1 commit into
microsoft:mainfrom
TPSJASPER:fix/523-reasoning-parameter-parity
Open

Jasper (TPSJASPER) wants to merge 1 commit into
microsoft:mainfrom
TPSJASPER:fix/523-reasoning-parameter-parity

Conversation

@TPSJASPER

Copy link
Copy Markdown

Summary

Port the Python OpenAI execution guard to TypeScript, Rust, and C#:

  • Reasoning models (o1–o9, gpt-5*): drop temperature, top_p, top_k, frequency_penalty, and presence_penalty.
  • Other models: drop reasoning_effort.
  • The guard runs after typed and passthrough options merge; typed options win, and the generated toWire/to_wire conversion stays rename-only.

Adds schema/model/conformance/openai-reasoning-guard.json, read by the Python reference and all three ports.

Tests

  • TypeScript: 50 guard tests pass; foundry package 71 pass; tsc and Prettier pass.
  • Rust: shared guard test passes; 81 prompty-openai and 51 prompty-foundry tests pass.
  • C#: 17 guard tests pass; 232 OpenAI and 13 Foundry non-integration tests pass.
  • Python: 24 shared-fixture tests pass.
  • cargo fmt/clippy and dotnet format are left to CI (local pinned toolchains unavailable).

Fixes #523

🤖 Generated with Claude Code

Match the Python execution policy in TypeScript, Rust, and C#: drop
scalar sampling parameters for o-series and GPT-5 reasoning models,
drop reasoning_effort on other models, and apply the guard after typed
and passthrough options merge. Add a shared conformance fixture read by
the Python reference plus all three ports.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@TPSJASPER

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

reasoningEffort: executor-level guard for deprecated sampling params is Python-only (cross-runtime parity gap)

1 participant