Integrate Keywords AI as LLM provider (gateway + optional logging) #10965
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.
Related GitHub Issue
Closes: #10962
Description
This PR adds Keywords AI as a new LLM provider in Roo Code, integrating their OpenAI-compatible gateway API with optional observability controls.
Key Implementation Details:
Provider Handler (
src/api/providers/keywordsai.ts):KeywordsAiHandlerextendingOpenAiHandlerto leverage the OpenAI-compatible gatewaydisable_log: trueinto request body when logging is disabled via thegetExtraRequestParams()hookX-KeywordsAI-Source: RooCode-Extensionfor trackingBase Handler Enhancement (
src/api/providers/openai.ts):getExtraRequestParams()method to allow subclasses to inject provider-specific body parametersModel Fetching (
src/api/providers/fetchers/keywordsai.ts):getKeywordsAiModels()to fetch available models from Keywords AI APIProvider Settings (
packages/types/src/provider-settings.ts):keywordsaiSchemawithkeywordsaiApiKey,keywordsaiBaseUrl, andkeywordsaiEnableLoggingfieldskeywordsaito provider types and model ID mappingsUI Components (
webview-ui/src/components/settings/providers/KeywordsAI.tsx):Model Selection Logic (
webview-ui/src/components/ui/hooks/useSelectedModel.ts):keywordsaicase in switch statement to properly use router modelsType Fixes:
keywordsai: {}toRouterModelstype and test mockscheck-typespassesDesign Choices:
KeywordsAiHandler extends OpenAiHandler) rather than composition to minimize code duplicationTest Procedure
Manual Testing Steps:
Configuration:
https://api.keywordsai.co/api/)Model Selection:
gpt-4o)Chat Functionality:
Logging Control:
disable_log: trueis sent in request bodyType Checking:
pnpm check-types(orturbo check-types)Testing Environment:
Pre-Submission Checklist
Documentation Updates
Documentation Needed:
Get in Touch
.francccc0303 (discord)
Will contact