Skip to content

fix(core): use effective_model() fallback in /provider switch#2156

Merged
bug-ops merged 3 commits intomainfrom
fix-2151-provider-model-fallback
Mar 23, 2026
Merged

fix(core): use effective_model() fallback in /provider switch#2156
bug-ops merged 3 commits intomainfrom
fix-2151-provider-model-fallback

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Mar 23, 2026

Summary

  • Fixes fix: /provider switch uses provider type name as model fallback when entry.model is None #2151: when entry.model is None, /provider <name> was setting the runtime model name to the provider type string (e.g. "ollama", "claude") instead of the actual default model
  • Added ProviderEntry::effective_model() in zeph-config returning the explicit model or per-type defaults matching those in build_provider_from_entry
  • Replaced the 3-line fallback in provider_cmd.rs with a single entry.effective_model() call

Test plan

  • 6 new unit tests in zeph-config cover all provider-type defaults and explicit model override
  • cargo nextest run --workspace --lib --bins — 5994 tests, 0 failures
  • /provider status now shows the correct model name after switching to a provider with no explicit model field

bug-ops and others added 3 commits March 23, 2026 06:40
When entry.model is None, the runtime model name was set to the provider
type string (e.g. "ollama", "claude") instead of the actual default model.

Add ProviderEntry::effective_model() to zeph-config that returns the
explicit model or the per-type default, and use it in provider_cmd.rs.
@bug-ops bug-ops enabled auto-merge (squash) March 23, 2026 07:11
@github-actions github-actions bot added rust Rust code changes core zeph-core crate bug Something isn't working size/M Medium PR (51-200 lines) labels Mar 23, 2026
@bug-ops bug-ops merged commit 53dcfbe into main Mar 23, 2026
25 checks passed
@bug-ops bug-ops deleted the fix-2151-provider-model-fallback branch March 23, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core zeph-core crate rust Rust code changes size/M Medium PR (51-200 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: /provider switch uses provider type name as model fallback when entry.model is None

1 participant