Repository navigation
feat(providers): [providers] expect for dynamically looked-up credentials - #28
Merged
Merged
Conversation
…mic lookups; document the limit Signed-off-by: Ilan Harel <[email protected]>
ilanh
force-pushed
the
feat/providers-expect
branch
from
November 3, 2026 08:26
f0397b2 to
61aea9b
Compare
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.
What and why
Credentials read through dynamic lookups (Ruby
ENV[key.to_s.upcase], Go viperSetEnvPrefix+GetString, litellm choosing the variable by model name) cannot be found statically, so lint did not flag them and provider detection missed them. They cannot be solved by analysis, so this documents the limit and adds a way to declare them once.[providers] expect = ["GITHUB_PERSONAL_ACCESS_TOKEN"]inopenshell-annotate.toml. Each entry behaves like an@openshell provider ENVdirective: it is mapped to a profile (profile dirs or[providers.env]), shows up in the providers JSON/script (or asunmapped, with sourceopenshell-annotate.toml: [providers].expect), and counts as declared for thelintenv-read check.This fixes the issue the way it proposed: documentation plus the config key, no attempt at static resolution.
Tests:
tests/providers_expect.rs(lint flag disappears, providers output, invalid entry).TOOLCHAIN=1.94 scripts/ci-local.shand stable clippy pass.Ordering: the README Limits bullet sits next to the one #21 edits, so whichever merges second needs a trivial rebase.
Closes #17