Repository navigation
Live integration vectors, reasoningEffort, turn-coverage gate, and Typra 2.1.8 - #522
Merged
Seth Juarez (sethjuarez) merged 10 commits intoSep 9, 2026
Merged
Conversation
Add a first-class reasoningEffort field to ModelOptions in the TypeSpec model with per-provider wire mappings (OpenAI chat/responses, Anthropic), and regenerate all runtimes (Python, C#, Go, Java, Rust, Swift, TypeScript). Frontier reasoning models deprecate scalar sampling params (temperature/top_p/top_k); reasoningEffort is the forward-compatible control surface. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…fort Keep the generated to_wire/_build_options mappers pure (deterministic knownAs renames so wire-conformance vectors still assert the rename), and apply capability guards only in the live execute path. OpenAI: drop temperature/top_p/top_k/frequency_penalty/presence_penalty for reasoning models (o-series, gpt-5) in the chat/responses arg builders. Anthropic: drop params the installed SDK no longer accepts and map reasoningEffort into output_config.effort. Adds TestReasoningEffortGuard coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Foundry: use azure.identity.aio DefaultAzureCredential for the async client. OpenAI: default base_url to OPENAI_BASE_URL or api.openai.com/v1 so key-less connections resolve. Add aiohttp to foundry/azure/all extras (async Entra token provider). Extend integration conftest and model-listing test for live runs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Anchors cross-runtime turn parity to the canonical EngineEventKind TypeSpec alias (23 members) and fails when any member is unasserted by the shared @vector corpus (vectors.json). Today 15/23 are covered; the 8 uncovered kinds (policy_applied, model_invocation_failed, model_reconciliation_required, model_invocation_reconciled, tool_result_reconciled, turn_failed, turn_reconciliation_required, post_commit_failed) are the vector-authoring backlog -- currently implemented behaviorally only in the Rust engine. Exposed as a strict standalone 'check:coverage' script. Intentionally NOT wired into the blocking 'build' chain yet: it is red until the cross-runtime port + covering vectors land, and blocking now would red unrelated in-flight work on this branch. Flip it into 'build' once green. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Typra 2.1.8 fixes the generated conversion-test parity gap reported in sethjuarez/typra#328: wire-conversion tests (toWire/fromWire assertions) are now emitted for every backend, not just Go and Java. Regenerating adds them to Python, C#, Rust, Swift, and TypeScript, and additionally emits invalid-input rejection tests (from_json_invalid / 'should reject malformed JSON') across all runtimes. Verified: Python model suite (766) and full Python suite (1472 passed, 57 integration deselected) green; Go model tests green. Turn-engine vector coverage gate unchanged (15/23 by design; tracked separately in #519). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Two CI regressions surfaced by the Typra 2.1.8 wire-conversion tests on PR #522: 1. Swift ModelOptions.toWire emitted the reasoningEffort RawRepresentable struct instead of its backing string (only field with a named string-union type), so a wire round-trip failed fromWire->load() with 'Expected string for field reasoningEffort.' Add a deterministic normalize-typra-output.mjs workaround appending .rawValue to that single assignment (mirrors the correct save() path). Runs in generate on local + CI, so regen stays reproducible. Verified: all 368 Swift tests pass. 2. TypeScript model sources were committed un-prettified because the TS workspace had no node_modules locally, so the emitter skipped prettier. Regenerated with TS deps installed; the 22 model .ts files now match CI's prettier output, fixing 'regeneration produces no diff.' Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…round Link the deterministic .rawValue toWire workaround to the upstream Typra emitter bug it works around, so it can be removed once the Swift backend unwraps RawRepresentable/named-union fields in the wire path. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add tracking references for the two previously-unnumbered 'tracked on sethjuarez/typra' workarounds: - Swift processor provider() shadowing -> sethjuarez/typra#304 (open, still reproduces on 2.1.8) - Go value-backed coerce-union dead fmt import -> sethjuarez/typra#305 (appears fixed in 2.1.8; workaround now a no-op guarding against regression) Verified against raw 2.1.8 emitter output. No generated-output change. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…s gap Link the restoreSwiftPackageResources workaround to the upstream feature request for a main-target resources: emit option (the shipped test-resources option from #260 only covers the test target and breaks Bundle.module for production Discovery code). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Hardens Prompty to run integration vectors against real LLM endpoints and closes several cross-runtime parity gaps surfaced along the way. Six commits:
fc07e784reasoningEfforttoModelOptions(TypeSpec + regen across all runtimes)09f5ce20reasoningEffortin the executorc50c3cc0c33ea820reasoningEffortf0862fb4deab0b69Highlights
reasoningEffortsupport — newModelOptionsfield flowing through TypeSpec to every runtime, with the Python executor translating it and guarding sampling params (temperature/top_p) that newer reasoning models deprecate.Live integration harness — Python plumbing to exercise vectors against real OpenAI / Azure (Entra-auth) endpoints, falling back to mocks when env vars are absent.
Turn-engine vector coverage gate (
schema/scripts/check-vector-coverage.mjs) — a forcing function that pins the canonicalEngineEventKindTypeSpec alias (23 members) against what the shared@vectorcorpus asserts. Currently reports 15/23 and exits non-zero; the 8 uncovered kinds are a real cross-runtime engine-parity backlog tracked in #519. Exposed as the standalonenpm run check:coverage; intentionally not wired into the blockingbuildchain until it's green.Typra emitter 2.1.8 — fixes the generated conversion-test parity gap (sethjuarez/typra#328, now closed): wire-conversion tests (
toWire/fromWireassertions) are now emitted for every backend, not just Go and Java. Regeneration adds them to Python, C#, Rust, Swift, and TypeScript, plus invalid-input rejection tests across all runtimes.Verification
cargo test --no-run— all test binaries compilePrompty.Core.Testsbuilds, 0 errorsKnown follow-ups (tracked separately)
buildchain. Includes theEngineTurnStatusvsRunTurnStatus/run_turn"error" status-vocabulary drift.reasoningEffortexecutor-level guard (drop deprecated sampling params on reasoning models) is currently Python-only; port to the Rust, C#, and TypeScript executors and add shared conformance coverage.Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com