Skip to content

Conversation

@shpigunov
Copy link

@shpigunov shpigunov commented Jan 31, 2025

Description

This PR adds support for OpenAI’s new o3-mini model to Roo Code by updating its model configuration. The changes update the o3-mini entry to reflect the correct settings as per the latest OpenAI API documentation. Specifically, the configuration now sets:

  • maxTokens to 100,000,
  • contextWindow to 200,000,
  • supportsImages to false (since o3-mini does not support vision),
  • supportsPromptCache remains false,
  • and pricing at $1.10 per 1M input tokens and $4.40 per 1M output tokens.

No modifications were needed in the handler’s logic because the existing routing and streaming code already correctly supports models outside of the o1 series.

Type of change

  • New feature

How Has This Been Tested?

  • Tests have been added to openai-native.test.ts
  • Ensured that the tests pass by updating the expected response from o3-mini

Checklist:

  • My code follows the patterns of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Additional context

The primary change is within the shared model configuration file where the o3-mini entry is updated. The handler logic remains unchanged because o3-mini falls under the default branch (streaming with system prompt) and is correctly managed by the existing implementation. This update ensures consistency with the latest OpenAI pricing and feature specifications.

Related Issues

Reviewers

@team-member1 @team-member2


Important

Add support for OpenAI's o3-mini model with updated configuration and test case.

  • Behavior:
    • Add support for o3-mini model in openAiNativeModels in api.ts with maxTokens 100,000, contextWindow 200,000, supportsImages false, supportsPromptCache false, inputPrice $1.10, outputPrice $4.40.
    • No changes to handler logic as existing code supports non-o1 models.
  • Testing:
    • Add test case in openai-native.test.ts to verify completePrompt with o3-mini model.

This description was created by Ellipsis for 58fdb6f. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Jan 31, 2025

⚠️ No Changeset found

Latest commit: 7329e94

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mrubens mrubens merged commit d1f23d2 into RooCodeInc:main Jan 31, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants