Skip to content

pool

diapason.agents.hybrid.skillorchestra.pool

Model-alias pool for the SkillOrchestra eval orchestrator.

The original SkillOrchestra (config/models.py + config/pool_config.json) maps stage aliases — search-1/2/3, reasoner-1/2/3, answer-1/2/3/4, answer-math-1/2 — onto a pool of 6+ models served via SGLang. Diapason runs a 2-model world (one local vLLM student + one cloud model), so the default pool collapses the alias tiers onto local/cloud by cost rank: the dearer -1 / -2 aliases (and answer-math-1) route to the cloud model, the cheaper -3 / -4 aliases (and answer-math-2) route to the local model. This mirrors stage_router.WeightedAverageStrategy.COST_TIERS.

A cell overrides any alias through method_cfg.model_pool::

method_cfg.model_pool = {
    "search-1" = { model = "claude-opus-4-7", endpoint = "anthropic" },
    "search-3" = { model = "Qwen/Qwen3.5-27B-FP8", endpoint = "http://localhost:8001/v1" },
    ...
}

endpoint is anthropic / openai / gemini for a cloud model, or an OpenAI-compatible base URL (http://...) for a local vLLM model.

ModelSpec dataclass

A resolved alias: which concrete model on which endpoint.

build_pool(*, local_model, local_endpoint, cloud_model, cloud_endpoint, overrides=None)

Resolve every alias to a :class:ModelSpec.

Default mapping collapses the alias tiers onto the cell's local/cloud pair; overrides (from method_cfg.model_pool) wins per alias.

call_alias(agent, spec, *, user, system=None, max_tokens=8000, temperature=1.0)

Single text-generation call through a resolved alias.

Returns (text, tokens_in, tokens_out, cost_usd). Dispatches to the right :class:LocalCloudAgent SDK helper by endpoint. temperature defaults to 1.0 — the value the original call_tool uses for every worker call (eval_frames.py:657).