fix: wire up ollama_base_url shorthand in config#175
Merged
jamiepine merged 3 commits intospacedriveapp:mainfrom Feb 23, 2026
Merged
fix: wire up ollama_base_url shorthand in config#175jamiepine merged 3 commits intospacedriveapp:mainfrom
jamiepine merged 3 commits intospacedriveapp:mainfrom
Conversation
fa3b7fa to
f382402
Compare
Fix 17 clippy errors that were failing CI on main: - Collapse nested if blocks using let-chains (stable since Rust 1.88) - Use ? operator instead of let-else returning None (config.rs) - Suppress too_many_arguments on TwitchAdapter::new - Move mod tests to end of cron/scheduler.rs (items_after_test_module) Fix bold_and_italic_nested test: add BOLD_ITALIC_PATTERN for ***text*** processed before bold/italic, producing correct <b><i>text</i></b> nesting. Fix tests/context_dump.rs: render_channel_prompt returns Result, add .unwrap_or_default() to match current return type.
The ollama_base_url and ollama_key config fields were parsed but never inserted into llm.providers, so any config using the documented shorthand got 'unknown provider: ollama' at runtime. Add the missing or_insert_with block in both the TOML and env-var loading paths, matching the pattern used by every other provider. Also remove the dead normalize_ollama_base_url function that was left over from the original PR. Fixes spacedriveapp#162
f382402 to
43d545f
Compare
|
@jamiepine could you look over this |
Member
|
On it, merging a few of these fixes now and will push 0.1.15 |
jamiepine
approved these changes
Feb 23, 2026
Marenz
added a commit
to Marenz/spacebot
that referenced
this pull request
Feb 23, 2026
deepseek_key was parsed and stored in LlmConfig but never inserted into the providers HashMap, causing 'unknown provider: deepseek' errors at runtime when deepseek appeared in a fallback chain. Same pattern as the nvidia fix (PR spacedriveapp#82) and ollama fix (PR spacedriveapp#175).
Marenz
added a commit
to Marenz/spacebot
that referenced
this pull request
Feb 23, 2026
deepseek_key was parsed and stored in LlmConfig but never inserted into the providers HashMap, causing 'unknown provider: deepseek' errors at runtime when deepseek appeared in a fallback chain. Same pattern as the nvidia fix (PR spacedriveapp#82) and ollama fix (PR spacedriveapp#175).
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.
The `ollama_base_url` and `ollama_key` config fields were parsed but never inserted into `llm.providers`, so any config using the documented shorthand got `unknown provider: ollama` at runtime. The custom `[llm.providers.ollama]` syntax worked fine since it bypasses the shorthand entirely.
Add the missing `or_insert_with` block in both the TOML and env-var loading paths, matching the pattern used by every other provider (deepseek, minimax, etc.). Also remove the dead `normalize_ollama_base_url` function left over from the original PR.
Three unit tests added:
Depends on #174.
Fixes #162