Open
Conversation
7231898 to
08958f7
Compare
Cherry-picked from 0ecbd17 (ck-test branch). call_llm() now supports ANTHROPIC_API_KEY as direct Anthropic API fallback, giving a 3-tier backend selection: AMD LLM Gateway -> direct Anthropic API -> litellm. Without this, kernel-evolve tools fail when only ANTHROPIC_API_KEY is available (e.g. running outside the AMD gateway). Co-authored-by: Cursor
Same 3-tier fallback as kernel-evolve: AMD gateway -> direct Anthropic API -> litellm. Fixes evaluate_kernel_quality and reflect_on_kernel_result failing when only ANTHROPIC_API_KEY is set (no AMD_LLM_API_KEY). Co-authored-by: Cursor
run_task_batch() was creating a minimal agent_config = {"save_patch": True},
discarding system_template, instance_template, cost_limit, and all other
agent settings from the merged YAML config. This meant custom configs
like commandment-config.yaml (which mandates MCP tool usage) never
reached the agent -- it always saw the default "You are a helpful
assistant that can do anything." prompt.
Add extra_agent_config parameter through:
mini.py -> run_orchestrator() -> _run_homogeneous_orchestrator() ->
run_task_batch() -> ParallelAgent
Co-authored-by: Cursor
These kernel-evolve MCP tools were defined on the server but not registered in ToolRuntime or tools.json, making them invisible to the agent. Now the agent can: - mutate_kernel: explore variants of a promising kernel - crossover_kernels: combine best aspects of two kernels - get_optimization_strategies: get bottleneck-specific strategy list Co-authored-by: Cursor
Replace hardcoded 'claude-sonnet-4.5' defaults in MCP servers with
configurable model selection via environment variable and YAML config.
Resolution order (highest to lowest priority):
1. GEAK_MCP_MODEL env var
2. YAML per-tool config (mcp.tools.<name>.model in geak.yaml)
3. YAML global config (mcp.default_model in geak.yaml)
4. Hardcoded fallback ('claude-sonnet-4.5')
Changes:
- kernel-evolve, kernel-ercs, automated-test-discovery servers: use
_DEFAULT_MODEL = os.environ.get('GEAK_MCP_MODEL', 'claude-sonnet-4.5')
- kernel-evolve, kernel-ercs CLIs: read GEAK_MCP_MODEL for --model default
- MCPToolBridge._default_config: forward GEAK_MCP_MODEL and API keys from
parent environment to MCP subprocess
- ToolRuntime: add mcp_config parameter, _resolve_mcp_model() for YAML
config resolution, auto-load from geak.yaml when not provided
- geak.yaml: add commented-out mcp section with default_model and per-tool
model override examples
Co-authored-by: Cursor
- Prerequisites: document ANTHROPIC_API_KEY as alternative to AMD gateway - MCP Tool Servers: add Model Configuration subsection (GEAK_MCP_MODEL env var, YAML per-tool config, resolution order) and API Key Support subsection (3-tier backend: AMD gateway, Anthropic, litellm) - Key Environment Variables: add ANTHROPIC_API_KEY, GEAK_MODEL, GEAK_MCP_MODEL to the table - Branch changelog: per-commit description of all 5 fix/mcp-essential commits with what changed and why each is needed Co-authored-by: Cursor
597e4fc to
6b88c29
Compare
Co-authored-by: Cursor
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.
To make MCP available to and used by agent in optimization loop