Skip to content

[DYNAMO] feat: DynamoAdminAPI + client.backend selector#2398

Draft
AmeenP wants to merge 1 commit intorefactor/admin-api-protocolfrom
feat/dynamo-admin-api
Draft

[DYNAMO] feat: DynamoAdminAPI + client.backend selector#2398
AmeenP wants to merge 1 commit intorefactor/admin-api-protocolfrom
feat/dynamo-admin-api

Conversation

@AmeenP
Copy link
Copy Markdown
Contributor

@AmeenP AmeenP commented May 2, 2026

Summary

Second AdminAPI implementation, foreshadowed by #2397. Default behavior is byte-identical to today; opt-in via client.backend = "dynamo".

Stacked on #2397 — base branch is refactor/admin-api-protocol. Once #2397 merges, rebase against main.

What's actually different about Dynamo

Method Dynamo behavior DynamoAdminAPI
health, pause, resume, update_weights, load_lora_adapter, init_broadcaster Same relative paths as vLLM; admin_base_url is what differs (…/v1/rl vs …/v1) Inherited from VLLMAdminAPI — httpx joins relative paths onto admin_base_url.
list_models Served at OpenAI-compat root (/v1/models), not under /v1/rl/ Overridden — sends absolute URL to bypass admin prefix.

That is it: one method override.

Why this fixes a real bug

Today, against Dynamo:

admin_base_url = ["http://...:8000/v1/rl"]
skip_model_check = true   # workaround

The skip_model_check = true papers over the fact that VLLMAdminAPI.list_models resolves to …/v1/rl/v1/models (httpx joins, does not host-anchor), which 404s. With backend = "dynamo" set, DynamoAdminAPI.list_models constructs an absolute URL anchored at the host, so the model check actually runs.

Wiring

  • client.backend: Literal["vllm", "dynamo"] = "vllm" added to ClientConfig.
  • setup_admin_api(client_config) selector.
  • Static and elastic inference pools build a backend-specific AdminAPI and pass it to model readiness and weight/LoRA update paths.

What's NOT in this PR

  • Renderer transport config is split into [DYNAMO] pass renderer transport to verifiers #2420.
  • The _check_server_health /health call in elastic.py is left inline; it has different raise-for-status semantics.
  • No path migration plan for Dynamo moving endpoints out of /v1/rl/; that would be a method override on DynamoAdminAPI.

Verification

  • git diff --check
  • uv run --no-sync python -m py_compile src/prime_rl/utils/client.py src/prime_rl/utils/elastic.py src/prime_rl/configs/shared.py

uv run --no-sync ruff check src/prime_rl/utils/client.py src/prime_rl/utils/elastic.py src/prime_rl/configs/shared.py is currently blocked by import sorting in client.py and elastic.py.

@AmeenP AmeenP changed the title feat(dynamo): DynamoAdminAPI + client.backend selector [DYNAMO] feat: DynamoAdminAPI + client.backend selector May 2, 2026
@AmeenP AmeenP force-pushed the feat/dynamo-admin-api branch from 83a0377 to d79c6ce Compare May 5, 2026 06:06
Adds the second AdminAPI implementation foreshadowed in the refactor PR.
Default behavior is unchanged -- you get DynamoAdminAPI by setting
``client.backend = "dynamo"`` in the config.

What's actually different about Dynamo today:

  * /v1/rl/load_lora_adapter, /v1/rl/health, /v1/rl/pause, /v1/rl/resume,
    /v1/rl/update_weights -- same relative paths as vLLM, just under a
    different admin_base_url prefix. DynamoAdminAPI inherits these
    unchanged from VLLMAdminAPI; httpx joins them onto admin_base_url.

  * /v1/models -- Dynamo serves this at the OpenAI-compat root, NOT
    under /v1/rl/. DynamoAdminAPI overrides ``list_models`` to send an
    absolute URL that bypasses the admin prefix.

This makes the model existence check work against Dynamo without
``skip_model_check = true`` (today's workaround in biswapanda's example
configs).

Wiring:

  * StaticInferencePool builds a backend-specific AdminAPI in __init__
    and threads it through wait_for_ready / update_weights.
  * ElasticInferencePool does the same for load_lora_adapter and the
    per-tick model check inside _check_server_health (the inline /health
    call there is left alone -- it has different raise_for_status
    semantics from AdminAPI.health and is out of scope for this PR).

What's NOT in this PR:

  * No path migration. If Dynamo moves additional endpoints out of
    /v1/rl/ later, those are method-level overrides on DynamoAdminAPI
    -- localised, not scattered across configs.
  * No collapsing of skip_model_check / use_token_client into backend
    defaults -- those are separate concerns that touch other code paths.
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