Problem
ACP agents such as Claude Code and Qwen Code are designed to call their provider's API (Anthropic, Alibaba, etc.) by default. Users who self-host Ollama cannot use these agents with local models without manually hacking environment variables (ANTHROPIC_BASE_URL, etc.).
Use case
I run Ollama locally and want to use ACP coding agents (Claude Code, Qwen Code) against local models instead of cloud APIs. Currently:
- Claude Code hardcodes ANTHROPIC_BASE_URL → api.anthropic.com
- Qwen Code hardcodes its provider endpoint
- Injecting env vars globally affects ALL agents, not just the ones I want routed to Ollama
A per-agent env injection mechanism in AionCore's ACP launch policy would let users selectively route individual agents to local models while others continue using their cloud endpoints.
Prior work
I had an implementation in PR #626 (now in draft/paused) that:
- Detected agents configured for Ollama mode
- Injected the correct env vars (ANTHROPIC_BASE_URL, auth tokens, model pins) at ACP spawn time
- Left non-Ollama agents untouched
Question
Is per-agent env injection for local model routing something the project would consider? Happy to refactor the approach to match the team's preferred architecture.
Problem
ACP agents such as Claude Code and Qwen Code are designed to call their provider's API (Anthropic, Alibaba, etc.) by default. Users who self-host Ollama cannot use these agents with local models without manually hacking environment variables (ANTHROPIC_BASE_URL, etc.).
Use case
I run Ollama locally and want to use ACP coding agents (Claude Code, Qwen Code) against local models instead of cloud APIs. Currently:
A per-agent env injection mechanism in AionCore's ACP launch policy would let users selectively route individual agents to local models while others continue using their cloud endpoints.
Prior work
I had an implementation in PR #626 (now in draft/paused) that:
Question
Is per-agent env injection for local model routing something the project would consider? Happy to refactor the approach to match the team's preferred architecture.