PUNKthe adaptive runtime

//DOCS Chorus

Governed intelligence route for punk/chorus: request controls, evidence traces, receipts, and governance posture.

Chorus

Chorus is Punk's governed intelligence route for harder research, coding, analysis, policy, creative, operational, and technical work.

Call it with one public model id:

{ "model": "punk/chorus" }

Punk keeps the caller's normal wire format and privately coordinates routing, source evidence, verification, policy, cost controls, and receipts behind the gateway.

When To Use It

Use Chorus when a request needs more than a single straightforward model call:

  • source-backed research or due diligence;
  • long-context answer generation;
  • coding, review, or debugging work that benefits from verification;
  • policy, security, legal, finance, or operations analysis;
  • high-value decisions where receipts and audit matter;
  • evaluation or shadow traffic before adopting an optimized route.

Use a normal provider model when the work is simple, low-risk, latency-sensitive, or already handled by cache/artifact routes.

Quick Start

Use either supported gateway wire.

WireEndpointResponse shape
OpenAI-style chatPOST /v1/chat/completionsOpenAI chat completion
Anthropic-style messagesPOST /v1/messagesAnthropic message

Example:

{
  "model": "punk/chorus",
  "messages": [
    { "role": "user", "content": "Compare these options and cite the evidence behind the recommendation." }
  ],
  "budget_limit_usd": 0.25,
  "latency_mode": "balanced",
  "quality_mode": "maximum_quality",
  "receipt_mode": "full",
  "circuit_mode": "learn",
  "chorus": {
    "requestId": "req_123",
    "workflowId": "wf_support",
    "labels": ["receipt-required"]
  }
}

The response includes the normal Punk headers:

HeaderMeaning
x-punk-run-idRun id for trace, feedback, receipt, and evidence lookup.
x-punk-routeSelected route. Chorus runs report a Chorus route.

Request Controls

Chorus has one model id. Different operating modes are selected with request fields:

FieldValuesPurpose
budget_limit_usdnumberPer-request cost ceiling.
latency_modefast, balanced, deep, maximum_qualityHow much orchestration depth Chorus may spend.
quality_modeeconomy, balanced, frontier_optional, maximum_qualityQuality and escalation posture.
policy_profilestringCustomer policy profile or governance lane.
receipt_modeoff, summary, fullHow much receipt material to retain for lookup.
circuit_modeoff, reuse, learnWhether successful routes may reuse or teach circuits.
shadow_modebooleanRecord evaluation data without treating Chorus as the production decision.
audit_levelminimal, standard, fullAudit depth for traces and receipts.
sota_mixbooleanEnable the maximum-quality SOTA mix preset even when another field would not imply it.
research_modeoff, som, deepWhether research-heavy tasks should gather source evidence.
research_max_queries / research_max_sourcesnumbersBounds for source-gathering work.
research_context_charsnumberContext budget per fetched source.
live_panel_modelsarray or comma-separated stringOptional candidate panel models run before the final answer.
live_synthesis_modelstringOptional final-answer model from the configured provider registry.
live_synthesis_requiredbooleanFail clearly if the requested final-answer path is unavailable.
live_synthesis_max_tokensnumberOutput-token budget for the final answer.
chorus_agent_modelstringOptional delegate model for Anthropic tool-declaring agent steps, including Claude Code launched through Punk.
answer_model / answer_max_tokensaliasesCompatibility aliases for final-answer controls.
local_onlybooleanRestrict eligible solver supply to local/offline paths.
allowed_model_classesarrayOptional allowlist such as commercial, frontier, open_weight, or local.
blocked_providersarrayOptional provider denylist for the request.
chorusobjectCustomer metadata preserved in receipts and evidence packets.

Typical presets:

GoalControls
Fastlatency_mode: "fast", optional quality_mode: "economy".
Balancedlatency_mode: "balanced", quality_mode: "balanced".
Deep reasoninglatency_mode: "deep", quality_mode: "frontier_optional".
Source-backed researchresearch_mode: "som", receipt_mode: "full".
Maximum qualitylatency_mode: "maximum_quality", quality_mode: "maximum_quality"; uses configured SOTA mix defaults when available, or set live_panel_models and live_synthesis_model explicitly.
Private/locallocal_only: true, optional allowed_model_classes.
Shadow evaluationshadow_mode: true, circuit_mode: "learn".

Evidence And Receipts

Every served Chorus run records a structured evidence trail in the Punk trace:

Trace eventPurpose
chorus.contractRequest classification, budget, policy, output, and evidence requirements.
chorus.claim_graphClaim-level work units and dependencies.
chorus.route_selectedSelected and rejected solver paths.
chorus.verifierGrounding, schema, contradiction, math, policy, or license checks.
chorus.research_packSource cards, evidence gaps, and retrieval errors when research mode is enabled.
chorus.live_panelCandidate panel models, token/cost/latency totals, and candidate hashes when a panel is used.
chorus.live_synthesisFinal-answer provider/model, token, cost, and latency metadata when used.
chorus.agent_delegateAgent-step delegate model, provider, key source, wire, and tool count for tool-declaring Anthropic requests.
chorus.tool_planTool calls returned by the agent-step delegate before they are serialized back to the client.
chorus.ledgerAccepted evidence, rejected claims, unresolved claims, costs, latency, and confidence.
chorus.receiptExportable proof object linked to the final answer hash.

Retrieve receipt material through:

MethodPathPurpose
GET/api/v1/receipts/:runIdDirect receipt lookup for a run.
GET/api/v1/runs/:runId/receiptRun-scoped receipt lookup.
GET/api/v1/runs/:runId/evidence-packetFull evidence packet with Chorus material when present.

Receipts expose the audit objects customers need. They do not expose private scoring weights, routing formulas, internal prompts, or solver heuristics.

Agent-Step Mode

When model: "punk/chorus" is called on the Anthropic wire with declared tools, Punk runs a single delegated agent step instead of returning a normal text answer. The delegate receives the same normalized request with stream: false; if it returns tool calls, Punk serializes them back as Anthropic tool_use blocks and records the tool plan in the run trace.

Delegate selection order:

  1. Request field or header such as chorus_agent_model, punk_chorus_agent_model, or x-punk-chorus-agent-model.
  2. Tenant setting chorus_agent_model.
  3. Environment variable PUNK_CHORUS_AGENT_MODEL.
  4. Punk's fallback delegate model, currently claude-sonnet-4-6.

This lets tool-declaring Anthropic-compatible agents keep their native tool loop while Punk still owns routing, policy, trace, and receipt behavior.

Research Mode

Research mode is separate from quality mode because not every hard request needs web evidence.

When research_mode is som or deep, Chorus can gather source evidence, turn pages into compact source cards, check coverage gaps, and feed accepted evidence into the final answer and receipts.

Use live_synthesis_required: true for strict production gates where a mock/local fallback would be misleading.

How It Differs From Fusion

Fusion-style panels usually send the whole prompt to several models, compare full answers, and produce a final response.

Chorus is designed to be a governed superset of that pattern. Maximum-quality Chorus can run a live candidate panel and final-answer route, but the panel is only one lane inside a larger execution job:

  1. Compile the request into a reasoning contract.
  2. Build claim-level work units.
  3. Gather source, tool, cache, or tenant evidence when needed.
  4. Route unresolved work to qualified models, tools, artifacts, or verifiers.
  5. Verify evidence coverage before answering.
  6. Save useful routes as reusable circuits and failed routes as negative knowledge.

The product goal is to beat Fusion-style whole-answer ensembling on the combined mix of answer quality, speed, cost, reliability, evidence quality, governance, and auditability. The economic goal is to buy only the next useful unit of intelligence instead of paying every candidate model to solve the whole problem.

Configured provider families are documented in Configuration. The SDK helper is documented in SDK.

Safety And Governance

Chorus inherits Punk's enterprise controls:

  • tenant isolation for runs, traces, receipts, and ledgers;
  • redaction before stored traces and exports;
  • policy checks before model/tool selection;
  • configurable budget and latency ceilings;
  • no side effects from evidence-review work;
  • caveat, fallback, approval, or block for unsupported high-risk claims;
  • opt-in, shape-level learning only across tenants.