Add ladder configurations - #112
Merged
Merged
Conversation
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.
…nto john/ladder-run
- 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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add model specific configuration files for BattleSnake / Core War / RobotRumble runs