Fix release tag downloads and normalize provider base URLs#64
Conversation
There was a problem hiding this comment.
Pull request overview
Aligns Argus’ release/download mechanics and configuration/docs with the repository’s actual tag and config conventions, and fixes OpenAI-compatible/Gemini base URL version-suffix handling to avoid double-version paths.
Changes:
- Updated GitHub release workflow + npm installer to use
argus-ai-v<version>release tags. - Normalized LLM provider
base_urlhandling so/v1and/v1betaare appended only when missing. - Updated generated
.argus.tomltemplate and README guidance to match current config schema.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/main.rs |
Updates the default .argus.toml template sections/keys to match the current config schema. |
npm/install.js |
Downloads release assets from argus-ai-v<version> tags to match release automation. |
crates/argus-review/src/llm.rs |
Adds versioned_base_url() helper and updates provider endpoints to avoid /v1 / /v1beta duplication; adds unit tests. |
README.md |
Documents [llm].base_url behavior for version suffix normalization. |
.github/workflows/release.yml |
Triggers release builds on argus-ai-v* tags instead of v*. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| For custom provider endpoints, set `[llm].base_url`. OpenAI-compatible and Gemini | ||
| base URLs can be provided either with or without the version suffix, for example | ||
| `https://openrouter.ai/api` or `https://openrouter.ai/api/v1`. |
There was a problem hiding this comment.
The README says Gemini base URLs can be provided with or without the version suffix, but the example only shows an OpenAI-compatible /v1 suffix. Since Gemini uses /v1beta in the client, this could mislead users into supplying a Gemini base URL with /v1. Consider updating this text to include a Gemini-specific example (e.g. .../v1beta) and/or clarify which suffix applies per provider.
| For custom provider endpoints, set `[llm].base_url`. OpenAI-compatible and Gemini | |
| base URLs can be provided either with or without the version suffix, for example | |
| `https://openrouter.ai/api` or `https://openrouter.ai/api/v1`. | |
| For custom provider endpoints, set `[llm].base_url`. OpenAI-compatible | |
| base URLs can be provided either with or without the `/v1` version suffix, for example | |
| `https://openrouter.ai/api` or `https://openrouter.ai/api/v1`. Gemini base URLs can likewise | |
| be provided with or without the `/v1beta` suffix, for example | |
| `https://generativelanguage.googleapis.com` or `https://generativelanguage.googleapis.com/v1beta`. |
| let normalized = base_url.unwrap_or(default_base_url).trim_end_matches('/'); | ||
|
|
||
| if normalized.ends_with(version_suffix) { | ||
| normalized.to_string() | ||
| } else { |
There was a problem hiding this comment.
versioned_base_url can return a relative URL like /v1 if base_url is set to an empty string or just / (because trim_end_matches('/') can produce an empty string). That will later cause reqwest URL parse errors that are hard to diagnose. Consider trimming whitespace and treating empty// as None (fall back to default_base_url), or returning an explicit configuration error early.
Summary
Closes #63
Supersedes #62