Skip to content

Add ladder configurations - #112

Merged
john-b-yang merged 12 commits into
mainfrom
john/ladder-run
Jul 6, 2026
Merged

Add ladder configurations#112
john-b-yang merged 12 commits into
mainfrom
john/ladder-run

Conversation

@john-b-yang

Copy link
Copy Markdown
Contributor

Add model specific configuration files for BattleSnake / Core War / RobotRumble runs

Add codeclash/agents/mini_anthropic_model.py: a mini-swe-agent model class that drives Claude
through a custom Anthropic-compatible base URL using the native Anthropic API (so prompt
caching is preserved) with explicit per-token cost tracking. The API key, base URL, and model
name are read from the environment (api_key_env / base_url_env / model_name_env) so no
endpoint-specific values live in committed configs.

Add the optional 'anthropic' dep as a [llama] extra (locked in uv.lock), document LLAMA_* env
vars in .env.example, and add ready-to-run ladder configs (RobotRumble + a cheap BattleSnake
smoke) whose climbing player uses the endpoint.
- codeclash/agents/mini_anthropic_model.py: mini-swe-agent model class driving Claude through a
  custom Anthropic-compatible base URL (native Anthropic API, so prompt caching is preserved)
  with explicit per-token cost tracking. API key via api_key_env; base URL / model optionally
  from env (base_url_env / model_name_env).
- pyproject.toml: optional 'anthropic' dep as a [llama] extra (locked in uv.lock).
- configs/mini/models/llama_*.yaml: reusable model blocks for the 5 gateway models
  (Opus 4.8, Opus 4.7, Sonnet 5 via AnthropicModel; Gemini 3.5 Flash via litellm OpenAI-compat;
  GPT-5.5 via litellm Responses API).
- configs/ablations/ladder/rungs/{robotrumble,corewar}.yaml: rung lists factored out for reuse.
- configs/ablations/ladder/{robotrumble,corewar}__<model>.yaml: 10 ready-to-run ladder configs,
  one per (game, model) pair — 'uv run codeclash ladder run <config>'.
- configs/ablations/ladder/battlesnake_llama_smoke.yaml: cheap wiring smoke (Opus 4.8).
- .env.example documents the LLAMA_* vars. Only LLAMA_API_KEY is required at runtime; model
  names + endpoints are verbatim in the configs.
- Claude gateway models (Opus 4.8/4.7, Sonnet 5) run with extended thinking enabled, which
  requires temperature unset (or 1.0). The model blocks set temperature: 0.2, causing every
  request to fail with HTTP 400. Remove model_kwargs/temperature and raise max_tokens
  4096 -> 16384. Verified against the anthropic-passthrough endpoint with the full agent
  request shape (system + tools + cache_control): now returns 200 / tool_use.
- Register litellm prices for gemini-3-5-flash-fair and gpt-5-5-genai-responses (from reveng's
  model_prices.json) so their cost is tracked instead of ignored. Claude self-computes cost
  from its cost: block (verified against reveng: opus/sonnet numbers match).
- Remove robotrumble_llama.yaml (stale env-indirection config reintroduced by a merge).
@john-b-yang john-b-yang self-assigned this Jul 6, 2026
@john-b-yang
john-b-yang merged commit 5835b2e into main Jul 6, 2026
5 checks passed
@john-b-yang
john-b-yang deleted the john/ladder-run branch July 6, 2026 14:50
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