Conversation
…ant detection Previously, gpt-5.3-codex and gpt-5.2-codex were incorrectly classified as gpt-5 instead of gpt-5-codex due to substring-based matching. This caused codex models to inherit non-codex prompt behavior, leading to malformed pseudo-tool output. This fix adds: - gpt-5.2-codex and gpt-5.3-codex to the gpt-5-codex variant patterns - gpt-5.2 to the gpt-5 variant patterns Co-authored-by: openhands <openhands@all-hands.dev>
Contributor
API breakage checks (Griffe)Result: Passed |
Contributor
Agent server REST API breakage checks (OpenAPI)Result: Passed |
all-hands-bot
approved these changes
Feb 27, 2026
Collaborator
all-hands-bot
left a comment
There was a problem hiding this comment.
Taste Rating: 🟢 Good taste - Clean fix for a real bug. The ordered tuple approach elegantly solves the substring matching problem. LGTM.
Contributor
…ention Convert TestModelVariantDetection class to simple parametrized functions to follow the repo convention of avoiding test classes unless necessary. Co-authored-by: openhands <openhands@all-hands.dev>
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
Fixes #2233 - Add gpt-5.3-codex and gpt-5.2-codex to model-variant detection to avoid gpt-5 fallback.
Previously,
gpt-5.3-codexandgpt-5.2-codexwere incorrectly classified asgpt-5instead ofgpt-5-codexdue to substring-based matching in_MODEL_VARIANT_PATTERNS. This caused codex models to inherit non-codex prompt behavior, leading to malformed pseudo-tool output and early run termination.Changes
gpt-5.2-codexandgpt-5.3-codexto the gpt-5-codex variant patternsgpt-5.2to the gpt-5 variant patternsChecklist
tests/sdk/utils/test_model_prompt_spec.pywith tests for gpt-5 variant detectionAgent Server images for this PR
• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server
Variants & Base Images
eclipse-temurin:17-jdknikolaik/python-nodejs:python3.12-nodejs22golang:1.21-bookwormPull (multi-arch manifest)
# Each variant is a multi-arch manifest supporting both amd64 and arm64 docker pull ghcr.io/openhands/agent-server:3298927-pythonRun
All tags pushed for this build
About Multi-Architecture Support
3298927-python) is a multi-arch manifest supporting both amd64 and arm643298927-python-amd64) are also available if needed