Skip to content

Fix release tag downloads and normalize provider base URLs#64

Merged
Meru143 merged 1 commit intomainfrom
codex/fix-release-tags-and-base-url
Mar 26, 2026
Merged

Fix release tag downloads and normalize provider base URLs#64
Meru143 merged 1 commit intomainfrom
codex/fix-release-tags-and-base-url

Conversation

@Meru143
Copy link
Copy Markdown
Owner

@Meru143 Meru143 commented Mar 26, 2026

Summary

  • align the release workflow with the repo's �rgus-ai-v* tags
  • update the npm installer to download binaries from the same tag prefix
  • normalize provider base URLs so /v1 and /v1beta are only added when missing
  • fix the generated .argus.toml template and README guidance to match the actual config schema

Closes #63
Supersedes #62

Copilot AI review requested due to automatic review settings March 26, 2026 14:34
@Meru143 Meru143 merged commit 0aa1d3b into main Mar 26, 2026
3 checks passed
@Meru143 Meru143 deleted the codex/fix-release-tags-and-base-url branch March 26, 2026 14:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_url handling so /v1 and /v1beta are appended only when missing.
  • Updated generated .argus.toml template 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.

Comment on lines +231 to +233
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`.
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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`.

Copilot uses AI. Check for mistakes.
Comment on lines +90 to +94
let normalized = base_url.unwrap_or(default_base_url).trim_end_matches('/');

if normalized.ends_with(version_suffix) {
normalized.to_string()
} else {
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
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.

[bug] OpenAI-compatible base URLs are implemented wrong

2 participants