fix: build a chat-completions client for v0 eval in the legacy bridge - #1615
Merged
Merged
Conversation
The orchestrator drives eval rollouts of v0 envs through the same LegacyEnvServer (run_rollout/run_group -> _run_v0 -> _v0_client), and eval uses an OpenAI chat-completions client. The #1613 guard raised on any non-renderer config, so it broke v0 eval ("MITO ... not supported"). Dispatch on the config type instead: a renderer config (training, TITO) builds a v0 renderer client; an OpenAI config (eval) builds a v0 chat-completions client. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mikasenghaas
marked this pull request as ready for review
June 10, 2026 23:08
Contributor
ApprovabilityVerdict: Needs human review This PR removes an explicit error guard and enables a previously-blocked code path for chat-completions clients in the v0 legacy bridge. While the change is small, it enables new runtime behavior rather than fixing broken functionality, warranting human review. You can customize Macroscope's approvability policy. Learn more. |
pull Bot
pushed a commit
to Stars1233/verifiers
that referenced
this pull request
Jun 23, 2026
…PrimeIntellect-ai#1615) The orchestrator drives eval rollouts of v0 envs through the same LegacyEnvServer (run_rollout/run_group -> _run_v0 -> _v0_client), and eval uses an OpenAI chat-completions client. The PrimeIntellect-ai#1613 guard raised on any non-renderer config, so it broke v0 eval ("MITO ... not supported"). Dispatch on the config type instead: a renderer config (training, TITO) builds a v0 renderer client; an OpenAI config (eval) builds a v0 chat-completions client. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.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
Fixes v0 env eval crashing in the legacy bridge.
The orchestrator drives both training and eval rollouts of a v0 env through the same
LegacyEnvServer(run_rollout/run_group→_run_v0→_v0_client). Training uses a renderer (token-in/out) client; eval uses an OpenAI chat-completions client (pool.get_eval_client()). The guard added in #1613 raised on any non-renderer config:so it broke v0 eval.
_v0_clientnow dispatches on the config type instead of raising:RendererClientConfig(type="renderers", training) → v0 renderer client (unchanged).OpenAIClientConfig(type="openai", eval) → v0 chat-completions client.Verification
ruff check --isolated/ruff format --isolated --checkclean._v0_client(OpenAIClientConfig(), model)builds anOpenAIChatCompletionsClient(no longer raises); aRendererClientConfigbuilds the renderer client as before.Note
Support OpenAI chat-completions client config in
LegacyEnvServer._v0_clientPreviously,
_v0_clientin legacy.py raised aValueErrorfor any non-renderer client config. It now accepts OpenAI chat-completions configs and builds aV0ClientConfigwithclient_type="openai_chat_completions", omitting renderer-specific fields. Renderer configs continue to pin the tokenizer torenderer_model_nameas before.Macroscope summarized 06b45e2.
Note
Low Risk
Narrow adapter change in the legacy bridge; renderer training path is unchanged and eval now mirrors existing
_eval_clientbehavior.Overview
Fixes v0 environment eval when rollouts go through
LegacyEnvServer(orchestrator eval usesOpenAIClientConfig, not the renderer used for training).LegacyEnvServer._v0_clientno longer raises on non-renderer v1 configs. It branches on config type:RendererClientConfigstill maps to a v0 renderer client (tokenizer pinned viarenderer_model_name); any other config (eval’s OpenAI chat-completions) maps to v0openai_chat_completionswith base URL, API key var, and headers only. Client caching is unchanged.Training-only rejection of chat-completions for v0 MITO is removed in favor of supporting eval while keeping the renderer path for training.
Reviewed by Cursor Bugbot for commit 06b45e2. Bugbot is set up for automated code reviews on this repo. Configure here.