Skip to content

Per provider settings#39

Merged
PTFOPlayer merged 6 commits into
masterfrom
per-provider-settings
Jun 28, 2026
Merged

Per provider settings#39
PTFOPlayer merged 6 commits into
masterfrom
per-provider-settings

Conversation

@PTFOPlayer

Copy link
Copy Markdown
Owner

No description provided.

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
Copilot AI review requested due to automatic review settings June 28, 2026 09:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread src/main.rs
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;
Comment thread .github/workflows/ci.yml
else
echo "version=$msrv" >> "$GITHUB_OUTPUT"
fi
- uses: dtolnay/rust-toolchain@master
Comment thread .github/workflows/ci.yml
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.
@PTFOPlayer PTFOPlayer merged commit ab57134 into master Jun 28, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants