fix(llm): list_models_remote constructs correct models URL#1921
Merged
fix(llm): list_models_remote constructs correct models URL#1921
Conversation
…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
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
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.
Summary
list_models_remoteinopenai.rswas building the URL as{base_url}/v1/models, doubling the/v1path segment whenbase_urlalready ends with/v1(e.g.https://api.openai.com/v1){base_url}/modelsto match the pattern used by all other endpoints (chat/completions,embeddings)Test plan
cargo +nightly fmt --check— passescargo clippy --workspace --features full -- -D warnings— passes (0 warnings)cargo nextest run --workspace --features full --lib --bins— 6047/6047 passedopenai::tests::list_models_remote_http_error_propagatesnow matches/modelsmock path and passesCloses #1903