GPT-5.6 Luna recently cut its token pricing by 80%, while DeepSeek V4 Flash delivered major performance gains. Running every task on a single flagship model like Sol wastes budget. Splitting responsibilities between a main orchestrator model and subagent worker models keeps costs down without hurting code quality.

Setting Up Subagents Within Your Subscription Quota

Start by routing luna_worker through your existing Codex subscription quota at zero extra cost. Set the model to gpt-5.6-luna and model_reasoning_effort to max in ~/.codex/agents/luna-worker.toml. Define explicit delegation rules in AGENTS.md so the main agent dispatches independent file edits and codebase research in parallel.

CategoryConfig FileKey SettingRole
Worker Agentluna-worker.tomlmodel = "gpt-5.6-luna"Executes research and implementation tasks.
Routing RuleAGENTS.md“Delegate large independent tasks in parallel”Separates main agent and subagent workloads.

Configure Sol, the main agent, to focus strictly on system architecture and final code review. luna_worker handles implementation details and repository lookups in parallel. This clear division of labor cuts token spend sharply while maintaining consistent output quality.

Connecting OpenRouter and External APIs

When subscription quotas run low or high-volume workloads demand lower unit rates, connect external APIs. Adding OpenRouter as a provider in ~/.codex/config.toml lets Codex call multiple models through a single endpoint. Pairing GPT-5.6 Luna Max or DeepSeek V4 Flash 0731 Max on OpenRouter as subagents improves cost efficiency. For heavy batch workloads that benefit from low cache rates, connecting directly to the official DeepSeek API works even better.

Pick from four routing setups depending on your workload:

  1. Codex Luna worker: Uses your existing subscription quota with no extra billing.
  2. OpenRouter Luna Max: Balances strong coding performance with predictable cost.
  3. OpenRouter DeepSeek V4 Flash 0731 Max: Gives direct control over provider data-handling policies.
  4. DeepSeek V4 Flash Max: Delivers the lowest token cost for high-volume runs.

Whichever option you choose, stick to two rules. Use these models strictly as a subagent rather than the main orchestrator, and lock reasoning effort to max on every model to prevent quality drops.

What to Check Before Picking a Router Provider

Judging providers by raw input and output token prices alone leads to unexpected bills. OpenRouter charges roughly 10x more for cache read tokens than the official DeepSeek API, creating a wide gap in effective cost. Teams with strict internal security policies should also verify non-China provider routing, fallback blocking, and ZDR endpoint support.

Factor in operational reliability such as latency and tool calling success rates. Picking the cheapest endpoint only to trigger repeated retries from failed tool calls inflates total token consumption. Match your infrastructure and data governance rules so Sol makes architectural decisions while Luna or DeepSeek executes the legwork.

Agent routing tuned to each model’s strengths directly shapes your AI infrastructure bill.

Summary

  • Separating the main planning agent (Sol) from worker subagents (Luna/DeepSeek) cuts flagship token spend.
  • Cache read pricing on OpenRouter can exceed the official API by 10x or more, so compare full pricing terms beyond base token rates.
  • Check data residency, ZDR support, and tool calling reliability when deploying internal agents to avoid retry-driven cost spikes.