repowise-dev / repowise-dev/repowise
[Bug] Per-repo "chat provider" picker also selects the writer for dashboard-launched generate jobs, overriding config.yaml
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 711
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 439
Description
Describe the Bug
The dashboard's per-repo provider picker is documented and labelled as the chat provider (server/provider_config.py:set_active_provider docstring: "overrides only that repo's chat"), but server/job_executor.py (~line 403) resolves dashboard-launched index/generate jobs through the same get_chat_provider_instance(repo_path, repo_id=…). The per-repo repos[repo_id] entry is step 1 of the resolver, so it outranks the repo's .repowise/config.yaml provider/model set at repowise init.
This becomes a trap because claude_cli / codex_cli do not implement stream_chat, so dashboard chat fails with "selected model doesn't support streaming" for anyone whose writer is a CLI seat. The only way to make chat work is to set a cheap API model in the picker — which then silently becomes the docs writer for any job started from the UI.
Steps to Reproduce
.repowise/config.yaml:provider: claude_cli,model: claude_cli/claude-opus-5.- Dashboard → repo Settings → provider
gemini/gemini-3.5-flash-lite(needed for chat to stream).PATCH /api/providers/active {provider, model, repo_id}persists it underrepos[repo_id]in~/.repowise/provider_config.json. - Start an index/generate job from the dashboard.
Expected Behavior
Concept pages written with claude_cli/claude-opus-5 (the repo's configured writer); chat uses gemini.
Actual Behavior
Pages are written with gemini-3.5-flash-lite. The job_executor.py comment says the picker is "the only one that carries a deliberate user decision", but config.yaml's provider/model is also deliberate and is the value every CLI path uses — so UI-launched and CLI-launched jobs write with different models.
Environment
- OS: macOS 26 (arm64)
- Python: 3.13
- Repowise: 0.50.0 (
uv tool install) - Claude Code CLI / Codex CLI 0.154.0 as subprocess providers
Additional Context
Suggested fixes (either): (a) separate chat_provider/chat_model from provider/model in repos[repo_id], with the picker writing the chat pair; or (b) in job_executor, prefer config.yaml when it names a provider and fall back to the picker only when it doesn't. Also worth a UI hint that CLI-backed providers can't be chat providers.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in server/provider_config.py at set_active_provider and trace the resolver used by server/job_executor.py around line 403, comparing the repos[repo_id] picker value with .repowise/config.yaml provider/model settings. Reproduce with a CLI writer and Gemini chat provider, then verify that dashboard chat still uses the picker while dashboard-launched index/generate jobs use the configured writer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai, api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 70/100