iOfficeAI / iOfficeAI/AionCore

Feature request: route ACP agents (Claude Code, Qwen Code) to local Ollama models

Open
#730 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
105
Forks
169
Avg merge
5h 58m
Merged PRs (30d)
84

Description

## 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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing PR #626 and the ACP launch policy in AionCore, since the issue identifies that policy as the intended integration point. Determine whether per-agent environment injection fits the project architecture; done means selectively routing configured Claude Code or Qwen Code agents to Ollama while leaving other agents unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
ollama, rust
Domain
ai, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.