fix(providers): resolve keyring:// keys for custom providers (v3.3.0) - #5
Merged
Merged
Conversation
…t built-ins v3.3.0. Retires a daily cron that has been patching the installed npm dist since 2026-07-03. initializeFromConfig() blanked any apiKey stored as the `keyring://<provider>` marker and left resolution to "the provider's env-var fallback". That works for the BUILT-IN providers in the switch below - anthropic, openai, zai and ollama each register their own well-known variable. A CUSTOM provider (longcat, and anything else added to config by hand) has no such fallback, so it was handed an empty bearer token and every request 401'd. The fix has existed for a month, in the wrong place: NUKE runs scripts/sentinel-cli-repatch.sh from cron EVERY DAY to re-apply it to node_modules/@dirtysouthalpha/sentinel-cli/dist, because `npm update -g` silently reinstalls dist and wipes it. That script's own header documents the bug precisely. A daily cron re-patching a published artifact is a symptom; the patch belongs in source. Resolves the environment variable directly at the point of blanking rather than assuming a downstream fallback exists. Verified: `npm run lint` (tsc --noEmit) clean; full suite 106 files / 844 passed, 11 skipped. Once 3.3.0 is published and installed on NUKE, sentinel-cli-repatch.sh and its crontab entry can be deleted - that is the point of the change. Scope note: this checkout carries unrelated uncommitted work on the secrets backends (file-backend, windows-backend and their tests). That is someone else's in-progress change and is deliberately NOT included here.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Retires the daily cron that has been patching the installed npm dist since 2026-07-03.
The bug.
initializeFromConfig()blanked any apiKey stored as thekeyring://<provider>marker and left resolution to "the provider's env-var fallback". That works for the built-in providers — anthropic, openai, zai, ollama each register their own well-known variable. A custom provider (longcat, and anything added to config by hand) has none, so it got an empty bearer token and every request 401'd.Where the fix has been living. NUKE runs
scripts/sentinel-cli-repatch.shfrom cron every day to re-apply this todist/, becausenpm update -greinstalls dist and wipes it. That script's header documents the bug exactly. A daily cron re-patching a published artifact is a symptom — the patch belongs in source.Verified:
npm run lint(tsc --noEmit) clean; full suite 106 files / 844 passed, 11 skipped.After publish + install on NUKE,
sentinel-cli-repatch.shand its crontab entry can be deleted.Scope: this checkout has unrelated uncommitted work on the secrets backends; deliberately not included.