Skip to content

Conversation

@cte
Copy link
Collaborator

@cte cte commented Feb 25, 2025

Description

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

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

Related Issues

Reviewers


Important

Adds support for Claude 3.7 Sonnet "Thinking" model in OpenRouter, including model parameter handling and UI updates.

  • Behavior:
    • Support for Claude 3.7 Sonnet "Thinking" model in openrouter.ts.
    • Sets temperature to 1.0 for models with thinking attribute.
    • Adjusts completionParams to include thinking logic.
  • Models:
    • Adds thinking attribute to ModelInfo in api.ts.
    • Updates anthropicModels and openRouterDefaultModelInfo to include thinking.
  • UI:
    • Updates ApiOptions.tsx to handle thinking models with a slider for token budget.
    • Modifies slider.tsx for UI consistency.

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

@cte cte requested a review from mrubens as a code owner February 25, 2025 20:58
@changeset-bot
Copy link

changeset-bot bot commented Feb 25, 2025

⚠️ No Changeset found

Latest commit: 69bcd2e

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

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. Enhancement New feature or request labels Feb 25, 2025
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Feb 25, 2025
} as OpenRouterChatCompletionParams)
}

console.log("OpenRouter completionParams:", completionParams)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✂️


for await (const chunk of stream as unknown as AsyncIterable<OpenAI.Chat.Completions.ChatCompletionChunk>) {
// openrouter returns an error object instead of the openai sdk throwing an error
console.log("OpenRouter chunk:", chunk)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✂️

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 25, 2025
Base automatically changed from cte/move-model-fetchers to main February 25, 2025 21:26
@cte cte merged commit 06f98ca into main Feb 25, 2025
8 checks passed
@cte cte deleted the cte/openrouter-claude-thinking branch February 25, 2025 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants