Per provider settings#39
Merged
Merged
Conversation
Replace single last_provider_url/last_model fields with per-provider maps (provider_urls, provider_models) so each provider remembers its own URL and selected model independently. Add helper methods get_url_for/set_url_for, get_model_for/set_model_for, get_current_url, get_current_model. Update all call sites and tests accordingly. Also skip the spinner animation when show_thinking is enabled, allowing the model's actual thinking content to stream in instead.
- Consolidate Linux/Windows build+test into a 3-OS matrix (adds macOS) - Add concurrency cancellation for superseded runs - Add docs job with RUSTDOCFLAGS=-D warnings - Add MSRV check (auto-skips when rust-version is unset) - Add cargo audit, cargo-deny, and typos jobs - Enforce --locked and -D warnings across jobs - Add timeout-minutes to every job - Clippy now scans --all-targets
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces per-provider persistence for model and base URL selections (so switching providers doesn’t overwrite prior choices), and includes a small UX/streaming tweak plus CI hardening.
Changes:
- Replace single “last model / last URL” settings with per-provider maps and add migration from legacy settings fields.
- Ensure Ollama chat requests are forced into streaming mode when using the raw SSE path.
- Tighten CI (warnings-as-errors, docs build, MSRV check, additional checks) and improve UI behavior around “thinking”.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tinyharness-lib/src/provider/ollama.rs | Forces stream: true in the raw /api/chat streaming path to prevent UI blocking. |
| tinyharness-lib/src/config/mod.rs | Introduces per-provider URL/model maps, accessors, and legacy migration with tests. |
| src/main.rs | Uses per-provider saved model selection and wires show_thinking into the runtime context. |
| src/commands/settings.rs | Displays the current model via the new per-provider accessor. |
| src/commands/models.rs | Persists model selection per provider instead of globally. |
| src/commands/debug.rs | Dumps current provider URL/model using per-provider accessors. |
| src/agent/setup.rs | Resolves/saves provider URLs using the per-provider map and updates tests. |
| src/agent/mod.rs | Skips spinner when “thinking” output is enabled to avoid redundant UI. |
| .github/workflows/ci.yml | Adds stricter flags, timeouts, docs job, OS matrix testing, MSRV check, audit/deny/typos jobs, and concurrency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+534
to
+541
| auto_select_model( | ||
| &mut *p, | ||
| settings | ||
| .get_model_for(provider_kind) | ||
| .map(|s| s.to_string()) | ||
| .as_ref(), | ||
| ) | ||
| .await; |
| else | ||
| echo "version=$msrv" >> "$GITHUB_OUTPUT" | ||
| fi | ||
| - uses: dtolnay/rust-toolchain@master |
| timeout-minutes: 10 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: crate-ci/typos@master |
- deny.toml: MIT-compatible permissive license allowlist; wildcards and unknown registries/git sources denied by default - .typos.toml: allowlist short test-fixture strings and accepted spellings (ratatui, unparseable, Invokable) - ci.yml: wrap MSRV grep in set +e so absent rust-version no longer fails the job
clippy (tests with -D warnings): - config::tests: use struct-literal init instead of field reassign on default - screen.rs: prefix unused end_row test bindings with _ - conversation.rs: prefix unused row loop variable with _ - sockudo_integration: allow(too_many_arguments) on test helper rustdoc (with -D warnings): - config::mod: split intra-doc links to valid items (no chained method links) - mode.rs: wrap <mode> placeholder in backticks to avoid HTML parsing - screen.rs: drop links to private write_wrapped, use backtick code instead - image.rs, registry.rs: wrap <path>/<n>/<name> placeholders in backticks - main.rs: wrap Arc<Mutex> in backticks - registry.rs: convert broken intra-doc link freeze_descriptions to code
Fixes remote memory exhaustion from unbounded out-of-order stream reassembly in quinn-proto Assembler. Pulled in transitively via reqwest -> ... -> quinn-proto.
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.
No description provided.