Skip to content

[DYNAMO] TITO Dynamo nvext transport follow-up#1313

Draft
AmeenP wants to merge 2 commits into
codex/dynamo-renderer-transportfrom
codex/dynamo-tito-nvext-followup
Draft

[DYNAMO] TITO Dynamo nvext transport follow-up#1313
AmeenP wants to merge 2 commits into
codex/dynamo-renderer-transportfrom
codex/dynamo-tito-nvext-followup

Conversation

@AmeenP
Copy link
Copy Markdown
Collaborator

@AmeenP AmeenP commented May 8, 2026

Summary

Ports the missing TITO-side Dynamo nvext transport support from Biswa's tested verifiers branch on top of #1287.

  • teaches OpenAIChatCompletionsTokenClient to use renderer_transport="dynamo_chat_nvext"
  • sends token-in requests through /chat/completions with nvext.token_data
  • fixes prompt-id prefix matching for vf.Message input
  • inherits the standalone renderers@7ca1ab3 pin from Add Dynamo renderer transport #1287

Context

This pairs with prime-rl #2446, which sets renderer_transport="dynamo_chat_nvext" for TITO clients when client.backend = "dynamo".

Validation

  • uv lock --check
  • uv run pytest tests/test_openai_chat_completions_token_client.py tests/test_renderer_client.py
  • uv run ruff check pyproject.toml verifiers/types.py verifiers/clients/renderer_client.py verifiers/clients/openai_chat_completions_token_client.py tests/test_renderer_client.py tests/test_openai_chat_completions_token_client.py
  • uv run ruff format --check pyproject.toml verifiers/types.py verifiers/clients/renderer_client.py verifiers/clients/openai_chat_completions_token_client.py tests/test_renderer_client.py tests/test_openai_chat_completions_token_client.py

biswapanda added 2 commits May 8, 2026 03:11
…okenClient

    The verifiers TITO client previously only spoke vLLM's TITO surface
    (/v1/chat/completions/tokens for the final POST, /tokenize for bridge
    tokenization). Dynamo bis/dynamo-rl serves neither route, so multi-turn
    TITO against Dynamo silently degraded to MITO every turn-2+ via the
    existing fallback path.

    This commit teaches the TITO client to read ClientConfig.renderer_transport
    (same field RendererClient consults) and route accordingly:

    - prime_vllm_generate (default): unchanged - posts to
      /v1/chat/completions/tokens and uses /tokenize over HTTP.

    - dynamo_chat_nvext: bridge tokenize runs locally via the renderers
      package (zero RTTs); final POST goes to /v1/chat/completions with
      placeholder messages + nvext.token_data carrying the stitched
      prompt_ids + explicit stop_token_ids from renderer.get_stop_token_ids().
      Wire shape matches what RendererClient already produces for the
      same transport, so a Dynamo deployment validated against renderer
      mode automatically accepts TITO traffic too.

    Adds two unit tests that assert the dynamo-transport wire shape end-to-
    end via a recording client + stub renderer (no real tokenizer download).
OpenAIChatCompletionsTokenClient.get_prompt_ids' prefix-match between
the prompt_messages caller-input and the trajectory step messages was
asymmetric:

- prompt_messages went straight through normalize_for_comparison (which
  picks up vf.AssistantMessage.model_dump's exhaustive view, including
  thinking_blocks=None and other defaulted fields).
- step_messages went through to_native_prompt FIRST, which produces the
  slimmer OpenAI-format dict that omits thinking_blocks entirely.

The two normalized forms then never compared equal whenever the caller
handed the client Pydantic vf.Message types -- the form MultiTurnEnv
produces after maybe_normalize_messages -- so the prefix match always
returned None and TITO silently fell back to MITO every turn-2+.
Probe-3 and the upstream test suite both used raw dict input, so the
asymmetry only showed up under real orchestrator rollouts.

Fix: drop None-valued keys in normalize_for_comparison. Both sides
land on the same shape regardless of whether they came in as Pydantic
or as plain OpenAI dicts.

Validated end-to-end against bis-dev/5/always-continue-tito (multi-turn
TITO + Dynamo bis/dynamo-rl smoke):
  348 /v1/chat/completions, 21 SIDECAR-SKIP-TOKENIZE markers, 0 fall-
  back warnings. Same SIDECAR token-prefix appears across turns,
  confirming the engine reuses prior-turn ids verbatim.

The existing 6 unit tests (4 vanilla TITO + 2 dynamo_chat_nvext) all
still pass; their dict-shaped input always normalized to the same
shape on both sides, so the symmetric drop-None doesn't change them.
@AmeenP AmeenP force-pushed the codex/dynamo-tito-nvext-followup branch from 0ef29e4 to 4bb3da6 Compare May 8, 2026 10:12
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.

2 participants