1jehuang / 1jehuang/jcode

Ambient mode: add provider_profile config option to route ambient to a different provider

Open
#105 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement priority: medium triage: needs-decision
Dominant language
Rust
Stars
19.9k
Forks
2.3k
Avg merge
2d 7h
Merged PRs (30d)
30

Description

Problem

Ambient mode always uses the default provider (e.g. Claude) regardless of what ambient.model is set to. There is no ambient.provider or ambient.provider_profile config option, so users cannot route ambient cycles to a different provider — such as a local model via [providers.<name>] — without changing the global default_provider, which would also affect interactive sessions.

Use case

I have a local Gemma 4 26B model running via llama.cpp with a [providers.gemma4] profile configured. I want ambient to use this free local model instead of burning Claude quota on cycles, while continuing to use Claude for interactive sessions.

Current config

[providers.gemma4]
base_url = "http://localhost:8080/v1"
api_key = "not-needed"
model = "gemma-4-26B-A4B-it-UD-Q4_K_XL.gguf"

[ambient]
enabled = true
model = "gemma-4-26B-A4B-it-UD-Q4_K_XL.gguf"  # has no effect — still routes to Claude

Expected behavior

Setting ambient.model to a provider-profile model, or adding a new ambient.provider_profile field, should route ambient cycles through that provider instead of the default.

Proposed solution

Add one of:

  • ambient.provider_profile = "gemma4" — references a [providers.<name>] block
  • ambient.provider = "openai-compatible" + honor the model name to resolve the right profile
  • Automatically infer the provider profile when ambient.model matches a model defined in a [providers.*] block

The first option (provider_profile) seems cleanest and most explicit.

Related

  • #104 (ambient tool discovery bug — cycles are all Incomplete regardless of provider)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named; start by tracing ambient configuration parsing and the provider-selection path. Done means an explicit provider profile routes ambient cycles without changing the interactive default, while preserving the existing default-provider behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.