Fix compute module startup by loading OpenRouter key from Sources#17
Fix compute module startup by loading OpenRouter key from Sources#17anand-testcompare merged 2 commits intomainfrom
Conversation
Load OpenRouter API key from compute module SOURCE_CREDENTIALS (additionalSecretOpenRouterApiKey) so FastAPI lifespan can configure DSPy LM in Foundry.
|
🚅 Deployed to the dspy-reference-examples-pr-17 environment in dspy-reference-example
|
WalkthroughAdds an OpenCode Palantir integration configuration file and extends LLM configuration to load OpenRouter API keys from a SOURCE_CREDENTIALS JSON file (with env fallback), prefixing OpenRouter model names when needed and binding the resolved API key into LLM config. Changes
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Comment |
Replace hardcoded Foundry instance URL with {env:FOUNDRY_URL} to avoid committing tenant-specific values.
Why
Compute module replicas were failing to start because the app requires
OPENROUTER_API_KEYat FastAPI lifespan startup.What changed
SOURCE_CREDENTIALS(supportsadditionalSecretOpenRouterApiKeyandapiKey).DSPY_PROVIDER=localas the explicit escape hatch.opencode.jsoncso Foundry source/egress setup can be automated.Summary by CodeRabbit
New Features
Improvements