Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jul 31, 2025

Implements a targeted default so when routed via OpenRouter and modelId === "openrouter/horizon-alpha", getModelMaxOutputTokens() returns 32,000 (down from 128k). Applied in src/shared/api.ts to ensure consistent backend behavior without UI changes.


Important

Cap output to 32,000 tokens for "openrouter/horizon-alpha" model when routed via OpenRouter in getModelMaxOutputTokens().

  • Behavior:
    • In getModelMaxOutputTokens() in api.ts, cap output to 32,000 tokens for modelId "openrouter/horizon-alpha" when routed via OpenRouter.
    • No UI changes; backend behavior only.

This description was created by Ellipsis for 718a75a. You can customize this summary. It will automatically update as commits are pushed.

@roomote roomote bot requested review from cte, jr and mrubens as code owners July 31, 2025 03:01
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. enhancement New feature or request labels Jul 31, 2025
Copy link
Contributor Author

@roomote roomote bot left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! I've reviewed the changes and found one critical issue that needs attention regarding test coverage, plus a minor suggestion for code maintainability.

// Special-case: Slack request to cap OpenRouter horizon-alpha default output to 32k
// Only applies when routed via OpenRouter and the model id is exactly "openrouter/horizon-alpha"
if (format === "openrouter" && modelId === "openrouter/horizon-alpha") {
return 32_000
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Missing test coverage for this new special case logic. Could you add a test case to that verifies this function returns 32,000 when and ? The existing test suite has comprehensive coverage for other scenarios but lacks this specific combination.

// Special-case: Slack request to cap OpenRouter horizon-alpha default output to 32k
// Only applies when routed via OpenRouter and the model id is exactly "openrouter/horizon-alpha"
if (format === "openrouter" && modelId === "openrouter/horizon-alpha") {
return 32_000
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could we consider extracting this magic number to a named constant? Something like would improve maintainability if this value needs to be referenced elsewhere or changed in the future.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 31, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jul 31, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants