Skip to content

config: unify bootstrap — single build_provider_from_entry() #2137

@bug-ops

Description

@bug-ops

Part of #2134 — Phase 3.

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

Goal

Replace 6 parallel provider construction paths in bootstrap/provider.rs with a single function.

Current State

bootstrap/provider.rs contains:

  • named_claude() — reads [llm.cloud] + secrets
  • pcfg_claude() — reads OrchestratorProviderConfig + fallback to [llm.cloud]
  • build_sub_provider("claude") — same with different entry point
  • summary_claude() — reads model_spec string + fallback to [llm.cloud]
  • Equivalent 4-way duplication for OpenAI, Gemini, Ollama

Tasks

  • Implement build_provider_from_entry(&ProviderEntry, &Config) -> Result<AnyProvider>
  • Rewrite create_provider() to dispatch on RoutingStrategy instead of ProviderKind
  • Remove all named_*, pcfg_*, build_sub_provider, summary_* functions
  • Update zeph-core/src/config.rs re-exports accordingly

Acceptance

  • create_provider() uses only build_provider_from_entry()
  • LLM serialization gate: live session test with orchestrator config before merge
  • All 6397 tests green

Metadata

Metadata

Assignees

No one assigned

    Labels

    configConfiguration file changescorezeph-core crateenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions