-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Problem (one or two sentences)
Add Harmony AI Provider Support for GPT-OSS Models
Description
Overview
Add first-class support for Harmony, OpenAI's response format specification for open-weight GPT-OSS models (gpt-oss-20b and gpt-oss-120b).
Problem
Currently, users wanting to use Harmony-compatible endpoints must use the generic "OpenAI Compatible" provider, which:
- Requires manual base URL configuration each time
- Lacks visibility as a dedicated provider option in the UI
- Doesn't clearly indicate Harmony-specific features like reasoning effort levels
- Provides no optimized configuration for Harmony's unique capabilities
Solution
Implement Harmony as a first-class API provider in Roo Code, similar to how Groq, SambaNova, and other providers are implemented.
Benefits
- Better User Experience: Harmony appears as a dedicated provider option in settings
- Clear Configuration: Pre-configured defaults for Harmony endpoints with customizable base URL
- Feature Visibility: Reasoning effort levels (low/medium/high) become discoverable and configurable
- Reliability: Extends proven BaseOpenAiCompatibleProvider pattern for consistency
- Open-Weight Support: Enables developers to use open-source models with Roo Code
What Will Be Implemented
Models:
gpt-oss-20b- 20B parameter model, optimized for speed (default)gpt-oss-120b- 120B parameter model, optimized for quality
Features:
- 128,000 token context window for comprehensive codebase analysis
- Reasoning effort levels: low, medium, high
- Streaming support for real-time responses
- Function/tool calling capabilities
- Configurable API key and base URL
- Full i18n support (17 languages)
Code Quality:
- Complete test coverage (12 test cases)
- Comprehensive JSDoc documentation
- TypeScript strict mode compliance
- Follows Roo Code contribution guidelines
References
Alignment with Project Goals
- ✅ Reliability First: Extends proven provider pattern for consistency
- ✅ Enhanced UX: First-class provider option with clear feature visibility
- ✅ Agent Performance: Support for reasoning effort levels enables better model configuration
Context (who is affected and when)
Roo Code users when using a GPT-OSS Harmony compatible endpoint with OpenAI Compatible provider
Desired behavior (conceptual, not technical)
- Harmony provider is available as a selectable option in API provider settings
- Both gpt-oss-20b and gpt-oss-120b models are selectable
- Configurable API key and base URL with sensible defaults
- Reasoning effort selector (low/medium/high) is visible in settings
Constraints / preferences (optional)
-
✅ Reliability First: Extends proven provider pattern for consistency
-
✅ Enhanced UX: First-class provider option with clear feature visibility
-
✅ Agent Performance: Support for reasoning effort levels enables better model configuration
-
Full i18n support (17 languages)
Code Quality:
- Complete test coverage (12 test cases)
- Comprehensive JSDoc documentation
- TypeScript strict mode compliance
- Follows Roo Code contribution guidelines
Request checklist
- I've searched existing Issues and Discussions for duplicates
- This describes a specific problem with clear context and impact
Roo Code Task Links (optional)
No response
Acceptance criteria (optional)
Acceptance Criteria
- Harmony provider is available as a selectable option in API provider settings
- Both gpt-oss-20b and gpt-oss-120b models are selectable
- Configurable API key and base URL with sensible defaults
- Reasoning effort selector (low/medium/high) is visible in settings
- All tests pass (npm test)
- TypeScript compilation succeeds with no errors
- README documents Harmony as a supported provider
- JSDoc documentation is comprehensive
Proposed approach (optional)
Add as Provider:
modified: README.md
modified: packages/types/src/provider-settings.ts
new file: packages/types/src/providers/harmony.ts
modified: packages/types/src/providers/index.ts
modified: src/api/index.ts
new file: src/api/providers/tests/harmony.spec.ts
new file: src/api/providers/harmony.ts
modified: src/api/providers/index.ts
new file: test-harmony-api.ts
modified: webview-ui/src/components/settings/ApiOptions.tsx
new file: webview-ui/src/components/settings/providers/Harmony.tsx
modified: webview-ui/src/components/settings/providers/index.ts
modified: webview-ui/src/components/ui/hooks/useSelectedModel.ts
modified: webview-ui/src/i18n/locales/en/settings.json
Trade-offs / risks (optional)
None
Metadata
Metadata
Assignees
Labels
Type
Projects
Status