Skip to content

config: migrate-config for [[llm.providers]] + startup error on old format #2136

@bug-ops

Description

@bug-ops

Part of #2134 — Phase 2.

Spec: .local/specs/022-config-simplification/spec.md § Phase 2

Goal

Implement migration tooling and make old-format configs fail loudly.

Tasks

  • Add migrate_llm_to_providers() to crates/zeph-config/src/migrate.rs
    • Detects presence of provider key (old format)
    • Converts [llm.cloud], [llm.openai], [llm.orchestrator], [llm.router] to [[llm.providers]]
    • Creates .bak backup before overwriting
  • Add detection of old-format keys in LlmConfig deserialization → clear error: "legacy [llm.cloud] format removed in v0.17.0 — run: zeph --migrate-config"
  • Rewrite config/default.toml to new format
  • Update --init wizard to generate new format

Acceptance

  • --migrate-config on each .local/config/*.toml produces valid new-format TOML
  • Old-format config prints actionable error on startup
  • --init produces new-format config
  • All tests green

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking-changeIntroduces breaking changesconfigConfiguration file changesenhancementNew feature or requestllmzeph-llm crate (Ollama, Claude)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions