fix(hermes): set model.api_key placeholder so LiteLLM accepts inference.local#4718
Conversation
…ce.local Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughHermes configuration now explicitly sets a ChangesHermes API Key Configuration
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
PR Review AdvisorFindings: 0 needs attention, 1 worth checking, 0 nice ideas Review findings🛠️ Needs attention
🔎 Worth checking
🌱 Nice ideas
This is an automated advisory review. A human maintainer must make the final merge decision. |
E2E Advisor RecommendationRequired E2E: Dispatch hint: Auto-dispatched E2E: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
E2E Scenario Advisor RecommendationRequired scenario E2E: Dispatch required scenario E2E:
Full scenario advisor summaryE2E Scenario AdvisorBase: Required scenario E2E
Optional scenario E2E
Relevant changed files
|
Selective E2E Results — ✅ All requested jobs passedRun: 26902203642
|
Summary
Hermes
buildHermesConfignever emittedmodel.api_key, so LiteLLM fell back to itsno-key-requiredplaceholder. LiteLLM'sVirtual Keyvalidator rejected that synchronously with HTTP 401 before any network call, breaking everycompatible-endpoint(custom-provider) onboard on Hermes. Setting ansk--prefixed placeholder satisfies the validator; OpenShell's L7 inference router strips clientAuthorizationand injects the cluster-route credential at egress, so the placeholder is never seen by the upstream.Related Issue
Fixes #4711
Changes
agents/hermes/config/hermes-config.ts— emitmodel.api_key: "sk-OPENSHELL-PROXY-REWRITE"so LiteLLM passes itssk-prefix gate.test/generate-hermes-config.test.ts— assert the placeholder field in default + Kimi-compat paths, plus a dedicated contract test for the LiteLLM gate.test/e2e/test-hermes-inference-switch.sh,test/e2e/test-bedrock-runtime-compatible-anthropic.sh—assert_hermes_configvalidatesmodel.api_keyis present andsk--prefixed.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesnpm run docsbuilds without warnings (doc changes only)Signed-off-by: Tinson Lai tinsonl@nvidia.com
Summary by CodeRabbit
Tests
Chores