Repository navigation
fix(onboarding): pass the OpenRouter key to qsv describegpt via QSV_LLM_APIKEY - #18
Merged
Merged
Conversation
…LM_APIKEY describegpt copies its command line into the descriptions it generates, so the key passed on --api-key ended up in qsv_dict.json, meta.json and index.json (and was visible to other local users in ps). qsv reads the same key from QSV_LLM_APIKEY when --api-key is absent, so pass it there. The existing scrubbers stay: data onboarded before this change still contains the key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
run_qsv_describegptpassed the OpenRouter key on--api-key. describegpt copies its command line into the attribution of the descriptions it generates, so the key ended up inqsv_dict.json,meta.jsonandindex.json. That is why the_scrub_secretsandscrubbed_json_bytesredaction exists. Putting it on argv also exposed it to other local users throughps.qsv reads the same key from
QSV_LLM_APIKEYwhen--api-keyis absent (src/cmd/describegpt.rs), so this passes it in the child's environment instead. The base URL and model stay on the command line.tests/unit/test_qsv_profiling.pyrunsrun_qsv_describegptagainst a fakeqsvonPATHthat records its argv and environment. It asserts the key arrives inQSV_LLM_APIKEYand appears nowhere in argv. I mutation-checked it: putting--api-keyback makes the test fail.tests/unitall pass (974 passed, 2 skipped), and ruff is clean.This is the first, standalone step of moving Verikan's qsv calls onto
qsv-client, which also adds timeouts and typed errors.🤖 Generated with Claude Code