Skip to content

fix(llm): list_models_remote constructs correct models URL#1921

Merged
bug-ops merged 8 commits intomainfrom
1903-model-list-404
Mar 16, 2026
Merged

fix(llm): list_models_remote constructs correct models URL#1921
bug-ops merged 8 commits intomainfrom
1903-model-list-404

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 16, 2026

Summary

  • list_models_remote in openai.rs was building the URL as {base_url}/v1/models, doubling the /v1 path segment when base_url already ends with /v1 (e.g. https://api.openai.com/v1)
  • Changed to {base_url}/models to match the pattern used by all other endpoints (chat/completions, embeddings)
  • Updated the doc comment on the function and the wiremock test mock path accordingly

Test plan

  • cargo +nightly fmt --check — passes
  • cargo clippy --workspace --features full -- -D warnings — passes (0 warnings)
  • cargo nextest run --workspace --features full --lib --bins — 6047/6047 passed
  • openai::tests::list_models_remote_http_error_propagates now matches /models mock path and passes

Closes #1903

bug-ops added 7 commits March 16, 2026 02:41
…s SHAs

Add `// lgtm[rust/cleartext-logging]` suppression comments to 11 intentional
debug/trace log sites that CodeQL incorrectly flags as sensitive data leaks
(closes #1905). Pin all GitHub Actions in ci.yml and release.yml to full
immutable commit SHAs to prevent supply chain attacks (closes #1906).
Fixes 26 open code-scanning alerts (actions/unpinned-tag) by replacing
mutable version tags with immutable commit SHAs across all workflow files.

Pinned actions:
- contributor-assistant/github-action v2.6.1 → ca4a40a
- ludeeus/action-shellcheck 2.0.0 → 00cae50
- dtolnay/rust-toolchain nightly → 0f1b44d
- dtolnay/rust-toolchain stable → 631a55b (+ explicit toolchain: input)
- Swatinem/rust-cache v2 → e18b497
- mozilla-actions/sccache-action v0.0.9 → 7d986dd
- taiki-e/install-action nextest → 9786bf0
- taiki-e/install-action cargo-deny → 91088e9
- taiki-e/install-action cross → 56720d5
- lycheeverse/lychee-action v2 → 8646ba3

Affects: ci.yml, ci-non-linux.yml, codeql.yml, docs.yml, release.yml, security.yml
URL was built as `{base_url}/v1/models`, doubling the `/v1` segment
when base_url already ends with `/v1` (standard OpenAI config).
Changed to `{base_url}/models` to match the pattern used by all
other endpoints in the same file.

Updated the doc comment and the wiremock test mock path accordingly.

Closes #1903
@github-actions github-actions bot added documentation Improvements or additions to documentation llm zeph-llm crate (Ollama, Claude) rust Rust code changes ci CI/CD configuration bug Something isn't working size/M Medium PR (51-200 lines) labels Mar 16, 2026
@github-actions github-actions bot removed the ci CI/CD configuration label Mar 16, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 16, 2026 17:14
@github-actions github-actions bot added size/XS Extra small PR (1-10 lines) and removed size/M Medium PR (51-200 lines) labels Mar 16, 2026
@bug-ops bug-ops merged commit 4e1f211 into main Mar 16, 2026
20 checks passed
@bug-ops bug-ops deleted the 1903-model-list-404 branch March 16, 2026 17:24
bug-ops added a commit that referenced this pull request Mar 16, 2026
* sec: suppress CodeQL cleartext-logging false positives and pin Actions SHAs

Add `// lgtm[rust/cleartext-logging]` suppression comments to 11 intentional
debug/trace log sites that CodeQL incorrectly flags as sensitive data leaks
(closes #1905). Pin all GitHub Actions in ci.yml and release.yml to full
immutable commit SHAs to prevent supply chain attacks (closes #1906).

* fix: add toolchain input for dtolnay/rust-toolchain SHA-pinned steps

* sec: pin all third-party GitHub Actions to SHA in workflow files

Fixes 26 open code-scanning alerts (actions/unpinned-tag) by replacing
mutable version tags with immutable commit SHAs across all workflow files.

Pinned actions:
- contributor-assistant/github-action v2.6.1 → ca4a40a
- ludeeus/action-shellcheck 2.0.0 → 00cae50
- dtolnay/rust-toolchain nightly → 0f1b44d
- dtolnay/rust-toolchain stable → 631a55b (+ explicit toolchain: input)
- Swatinem/rust-cache v2 → e18b497
- mozilla-actions/sccache-action v0.0.9 → 7d986dd
- taiki-e/install-action nextest → 9786bf0
- taiki-e/install-action cargo-deny → 91088e9
- taiki-e/install-action cross → 56720d5
- lycheeverse/lychee-action v2 → 8646ba3

Affects: ci.yml, ci-non-linux.yml, codeql.yml, docs.yml, release.yml, security.yml

* fix(llm): list_models_remote constructs correct models URL

URL was built as `{base_url}/v1/models`, doubling the `/v1` segment
when base_url already ends with `/v1` (standard OpenAI config).
Changed to `{base_url}/models` to match the pattern used by all
other endpoints in the same file.

Updated the doc comment and the wiremock test mock path accordingly.

Closes #1903
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation llm zeph-llm crate (Ollama, Claude) rust Rust code changes size/XS Extra small PR (1-10 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(llm): /model list returns 404 — list_models_remote appends /v1/models to base_url that already contains /v1

1 participant