Skip to content

responses: normalize developer and instructions for Codex#219

Closed
krystophny wants to merge 6 commits intowaybarrios:mainfrom
computor-org:feature/responses-api-codex-compat
Closed

responses: normalize developer and instructions for Codex#219
krystophny wants to merge 6 commits intowaybarrios:mainfrom
computor-org:feature/responses-api-codex-compat

Conversation

@krystophny
Copy link
Copy Markdown
Contributor

@krystophny krystophny commented Mar 24, 2026

Summary

  • normalize Responses developer content into a single leading system message
  • merge instructions with developer/system content in the prompt shape Codex expects
  • add targeted regression coverage for the normalization rules

Main files

  • vllm_mlx/server.py
  • tests/test_responses_api.py

Stack note

This PR is logically on top of PR #214 because it only makes sense once /v1/responses exists.

Until #214 lands, GitHub will show the combined diff from the stacked branch. After #214, the remaining diff should be the prompt-normalization change only.

Reviewer focus

The main behavior change is prompt shaping for strict chat templates and Codex-style requests:

  • developer becomes system
  • instructions and explicit developer/system content are merged into one leading system message
  • duplicate or misplaced system-style content is avoided

Tests

  • PYTHONPATH=/Users/ert/code/vllm-mlx /Users/ert/code/.venv/bin/python -m pytest tests/test_responses_api.py -q

@krystophny krystophny force-pushed the feature/responses-api-codex-compat branch from dd838de to 64f0bbe Compare March 24, 2026 12:17
@krystophny krystophny changed the title Add Codex Responses prompt normalization responses: normalize developer and instructions for Codex Mar 24, 2026
@krystophny
Copy link
Copy Markdown
Contributor Author

Closing this in favor of #214. The prompt-normalization change is now folded into the core Responses PR so reviewers can reason about the request-translation layer in one place.

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.

1 participant