feat: add API key support for custom OpenAI-compatible providers#906
feat: add API key support for custom OpenAI-compatible providers#906unn-Known1 wants to merge 2 commits into
Conversation
…integrate into configuration workflows
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 24 minutes and 56 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (17)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
This PR adds API key authentication support for custom OpenAI-compatible model backends. It introduces a new UI component for configuring base URL and API key, extends the configuration schema to persist credentials, and threads the API key parameter through provider factory functions and all construction callsites.
Changes Made
Frontend UI
CustomModelSectioncomponent in settings for configuring custom OpenAI-compatible providersLocalModelDebugPanelsettings pageBackend Configuration
Configstruct withapi_keyfieldLocalAiConfigwithbase_urlandapi_keyfieldsapi_keyto model settings update schemaProvider Integration
api_keyparameter through all provider factory functionscreate_backend_inference_providerto use OpenAI-compatible provider when API key is setCode Quality
Files Changed
app/src/components/settings/panels/local-model/CustomModelSection.tsxapp/src/components/settings/panels/LocalModelDebugPanel.tsxapp/src/utils/tauriCommands/config.tssrc/openhuman/config/schema/types.rssrc/openhuman/config/schema/local_ai.rssrc/openhuman/config/ops.rssrc/openhuman/config/schemas.rssrc/openhuman/providers/ops.rssrc/openhuman/routing/factory.rssrc/openhuman/agent/...src/openhuman/threads/ops.rssrc/openhuman/channels/...src/openhuman/learning/...src/openhuman/tools/...Closes #867
Testing