evals: th config fetch — pin prod env + org, force JWT auth#121
Open
brentrager wants to merge 2 commits into
Open
evals: th config fetch — pin prod env + org, force JWT auth#121brentrager wants to merge 2 commits into
brentrager wants to merge 2 commits into
Conversation
scripts/run-evals.sh fetches the LiteLLM gateway virtual key from @smooai/config via `th config get liteLLMVirtualKeyAiServer` (env-overridable) and runs the LLM-as-judge eval suite against the live gateway. Replaces reading the key out of opencode auth.json — @smooai/config is the single source of truth, fetched at run time and never printed. Validates the key is a sk- virtual key (the gateway 401s on non-virtual keys) and fails with a clear message otherwise. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Three subtle env-inheritance bugs the wrapper hit: - Read the ambient SMOOAI_CONFIG_ENV (your local working env, usually `development`, where the key is the literal placeholder "unset") instead of production where the real key lives → now a dedicated SMOOAI_EVAL_GATEWAY_ENV defaulting to production. - Ambient @smooai/config M2M env vars (API_KEY/CLIENT_*/API_URL) override --org-id and resolve the wrong org → now unset for the fetch, forcing the th user JWT + explicit --org-id (cwd-independent). - Require SMOOAI_CONFIG_ORG_ID explicitly (the infra-secrets org) with a clear error rather than silently resolving a default org. Verified end-to-end: fetches the prod virtual key via th config and runs the llm_judge suite green. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Fix th config fetch in the evals runner: pin the production environment + org and force JWT auth.
🤖 Generated with Claude Code