Skip to content

config: env var vs config.yaml precedence contradicts documented order #33

Description

@TGPSKI

Context

  • Session note: .env had LEATHER_LLM_ENDPOINT / LEATHER_MODEL; config.yaml had llm_endpoint: / model:. Bare leather run connected to Ollama's default port (11434) instead of vLLM's (8000) until .env was explicitly sourced into the shell.
  • docs/modules/config.md documents the intended order as: CLI flags > YAML > env > built-in defaults — i.e. YAML should override env. Observed behavior contradicted this: the YAML-configured endpoint alone wasn't sufficient.
  • This may be a real precedence bug, not just a docs gap — confirm which before writing docs that describe behavior that doesn't actually happen.

Work

  • Reproduce: set llm_endpoint in config.yaml only (no env var set), confirm whether the YAML value is actually used at runtime
  • If YAML is NOT winning as documented, fix internal/config/config.go's Load precedence logic
  • If YAML IS winning and this was a one-off (e.g. key name mismatch), confirm the correct key name and add a validation error for common misnamed keys
  • Update docs/modules/config.md to match confirmed, verified behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-workMinimal agent-consumable work item

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions