A config file given with CHATTY_CONFIG is ignored unless its path contains "config"
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start at ConfigWithSources.load_config in src/chatty/config.py:466 and read how CLI, environment, and TOML values are selected. Reproduce with CHATTY_CONFIG pointing to a TOML file whose path lacks “config,” then check chatty print-config and chat behavior. Done when the file’s model and base_url values apply without relying on its path or source label.
Written by the indexing model from the issue text.
Description
ConfigWithSources.load_config (src/chatty/config.py:466) only applies a TOML value when its recorded source starts with chatty.toml or contains the substring config:
if key in _CONFIG_FIELDS and (source.startswith("chatty.toml") or "config" in source):
A file found through CHATTY_CONFIG has source env:CHATTY_CONFIG (<path>), so its values are dropped unless the path happens to contain lowercase config.
Effect: with CHATTY_CONFIG=/path/to/proj.toml containing model = "mymodel" and a base_url, chatty uses the defaults (model = "gpt-4.1", empty base_url), and chat fails with "No base_url configured". chatty print-config still says the values came from the file:
base_url: (not set) (from: env:CHATTY_CONFIG (/path/to/proj.toml))
model: gpt-4.1 (from: env:CHATTY_CONFIG (/path/to/proj.toml))
CHATTY_CONFIG is the documented way to point chatty at a config file.
Fix: decide whether a TOML value applies from the precedence logic itself (no CLI value, no env var for that key), not by matching the source label.
- Dominant language
- Python
- Stars
- 0
- Forks
- 2
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 13
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from lanl/chatty
-
area: rag bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
area: client bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
area: ui bug wrong-result
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
area: config bug wrong-result
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
area: sessions bug data-loss
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
software-mansion-labs/Diplomat#20 ·
Maintainers usually reply within 1 day
-
[Windows] Hidden title bar: a maximized window restored from minimized on a secondary monitor gets the primary monitor's work area as its client areaPossibly taken @lijy91 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
libnativeapi/nativeapi#53 · 1 reaction ·
Maintainers usually reply within 1 day
-
View Counts discarded due to field name mismatchPossibly taken @rsiva0400 claimed this today. Opensite-bug triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Model version publishes the new UK firm entity as a personPossibly taken @vahid-ahmadi claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PolicyEngine/policyengine.py#764 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
spcl/HPCAgent-Bench#264 ·
Maintainers usually reply within 1 day