feat(config): unify STT provider under [[llm.providers]] with stt_model field#2179
Merged
feat(config): unify STT provider under [[llm.providers]] with stt_model field#2179
Conversation
…el field Move STT model/endpoint configuration from [llm.stt] into [[llm.providers]] entries via a new `stt_model` field, following the same flat-union pattern as `embedding_model` and `vision_model`. [llm.stt] is kept for STT-specific options (provider reference, language, VAD settings) but no longer holds model or base_url. - Add `stt_model: Option<String>` to `ProviderEntry` - Slim `SttConfig`: remove `model` and `base_url` fields - Add `stt_provider_entry()` and `validate_stt()` on `LlmConfig` - Replace string-based candle detection with `ProviderKind::Candle` + stt_model - Add `migrate_stt_to_provider()` to `--migrate-config` pipeline (step 1) - Remove deprecated env vars ZEPH_STT_MODEL and ZEPH_STT_BASE_URL - Add MigrateError::InvalidStructure for robust error handling - 22 new unit tests (providers + migrate) BREAKING CHANGE: configs with [llm.stt] model/base_url must be migrated. Run: cargo run --features full -- --migrate-config path/to/config.toml Closes #2175
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2175
Summary
stt_model: Option<String>toProviderEntry, following the existingembedding_model/vision_modelflat-union patternSttConfig: removemodelandbase_url(moved to provider entry); keepprovider(name ref) andlanguagestt_provider_entry()andvalidate_stt()resolution helpers onLlmConfigProviderKind::Candle+stt_modelcheckmigrate_stt_to_provider()as step 1 of the--migrate-configpipelineZEPH_STT_MODELandZEPH_STT_BASE_URLMigrateError::InvalidStructurefor proper error propagation (replaces.expect()panics)providers.rsandmigrate.rsBreaking Change
Configs with
[llm.stt] model = ...or[llm.stt] base_url = ...must be migrated:Config before/after
Before:
After:
Test plan
cargo +nightly fmt --check— cleancargo clippy --profile ci --workspace --features full -- -D warnings— 0 warningscargo nextest run --workspace --features full --lib --bins— 6488 passed (+32 vs base)