Repository navigation
feat: provider::api_key_variables(); probe runtimes take environment variables - #366
Merged
Merged
Conversation
…variables - yoagent: `provider::api_key_variables()` lists every environment variable yoagent reads a credential from (each provider's, Bedrock's AWS_*, the YOAGENT_API_KEY/API_KEY fallback, the decision presets'). `resolve_api_key` reads the same table, so they cannot drift; a test pins the decision names to their constants. - yoagent-rutis: `probe::pi_with` / `probe::dsh_with` with `ProbeOptions` (`env`, OsString, empty allowed), set over the inherited environment; the DSH probe's own DSH_HOME / DSH_AGENTS_HOME win. `pi` / `dsh` unchanged. Asked for by yobuild (M3b step 4: plugins without the provider keys). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T7iq5hpndSiHQcnAsywKuG
- The Bedrock branch of resolve_api_key reads its names from BEDROCK_KEY_VARIABLES too. - `systemone` stays private; a cfg(test) re-export gives the test its three constants. - The DSH probe test asserts DSH_HOME is set and is the probe's own. - CHANGELOG says precisely what cannot drift. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T7iq5hpndSiHQcnAsywKuG
Collaborator
Author
|
Review: no critical or important issues (refactor checked behaviour-identical per provider; list complete against every env read in src/; env order confirmed last-wins in rutis-bridge). Suggestions applied in 33e19a6: the Bedrock branch reads BEDROCK_KEY_VARIABLES, |
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.
Asked for by yobuild (M3b step 4, design in yobuild PR #54: every plugin runtime it starts gets each model-provider key variable set to
"", since rutis'sLauncherand the stdio MCP transport can only add variables).check's probes were the one runtime still inheriting the keys.yoagent (additive):
provider::api_key_variables() -> Vec<&'static str>— every variable yoagent reads a credential from, each once: the providers' (asresolve_api_keyreads them), Bedrock'sAWS_BEARER_TOKEN_BEDROCK/AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY/AWS_SESSION_TOKEN, theYOAGENT_API_KEY/API_KEYfallback, and the decision presets'TYPESAFE_API_KEY/CLOUDFLARE_API_TOKEN/CLOUDFLARE_AUTH_TOKEN.resolve_api_key's per-providermatchbecame the privatePROVIDER_KEY_VARIABLEStable both read (same names, same order, same fallback; Bedrock/vertex/local unchanged), so the list cannot drift. Unit tests: every expected name present, no duplicates; withdecision, the decision names equaldecision::systemone's constants (systemonemadepub(crate)for that).yoagent-rutis (additive):
probe::ProbeOptions { env: Vec<(OsString, OsString)> }(#[non_exhaustive],Default,.env(name, value)builder) andprobe::pi_with/probe::dsh_withtaking&ProbeOptions;pi/dshdelegate with the default. The variables are set over the inherited environment (an empty value included); the DSH probe's privateDSH_HOME/DSH_AGENTS_HOMEare set after them and win.probe_options_set_the_runtime_s_environment: a pi extension sees a value and an empty one (and nothing without options); a DSH row sees the value, and a caller'sDSH_HOMEdoes not override the probe's.Docs: CHANGELOG (
## Unreleasedfor yoagent,## yoagent-rutis Unreleased),docs/providers/overview.md, the yoagent-rutis README probe section, both CLAUDE.md files.Not done here: true variable removal (
Launcher::env_remove) belongs to rutis upstream.Checks: yoagent
--all-featurestest / clippy / doc / fmt clean; yoagent-rutis clippy, doc, fmt clean,probe_test11/11. (Fourdsh_testhost tests fail locally only because this worktree borrows anode_modulesinstalled before #356 addeddsh-session-persistence-jsonl; CI installs fresh.)🤖 Generated with Claude Code
https://claude.ai/code/session_01T7iq5hpndSiHQcnAsywKuG