Skip to content

test(gateway): update auto-routing reasoning_effort test - #1049

Merged
steebchen merged 2 commits into
mainfrom
steebchen/reasoning-effort-test
Oct 21, 2025
Merged

steebchen merged 2 commits into
mainfrom
steebchen/reasoning-effort-test

Conversation

@steebchen

@steebchen steebchen commented Oct 21, 2025

Copy link
Copy Markdown
Member

Background

The existing test for auto-routing was too specific, assuming only gpt-5-nano would be selected with reasoning_effort set to "minimal". This prevented the test from passing when other reasoning models (which should use "low" effort) were selected.

Changes

  • Renamed test Auto-routing sets reasoning_effort to minimal for gpt-5 models to Auto-routing sets reasoning_effort appropriately in apps/gateway/src/api-individual.e2e.ts.
  • Removed assertions that checked for a specific usedModelMapping (gpt-5-nano).
  • Updated assertions to verify that a reasoning model is selected and the request completes successfully.
  • Modified comments to reflect that the test now covers scenarios where reasoning_effort could be "minimal" (for gpt-5*) or "low" (for other reasoning models).

Testing

  • Run e2e individual tests to verify the updated auto-routing logic.
  • Ensure requests complete successfully with various models routed by auto.

Summary by CodeRabbit

  • Tests
    • Updated auto-routing test assertions for reasoning model selection to be more flexible
    • Refined expectations for reasoning effort configuration across different model types
    • Adjusted token usage verification to accommodate varying effort levels

@coderabbitai

coderabbitai Bot commented Oct 21, 2025

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@steebchen has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 9 minutes and 15 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between fbb4386 and 48a5b6b.

📒 Files selected for processing (1)
  • apps/gateway/src/api-individual.e2e.ts (2 hunks)

Walkthrough

A test in api-individual.e2e.ts is updated to relax auto-routing assertions, removing explicit expectations for gpt-5-nano selection and provider matching. The test now validates that any reasoning model is selected with conditionally-appropriate reasoning_effort values based on model type.

Changes

Cohort / File(s) Summary
E2E test auto-routing validation
apps/gateway/src/api-individual.e2e.ts
Renamed test from "Auto-routing sets reasoning_effort to minimal for gpt-5 models" to "Auto-routing sets reasoning_effort appropriately". Removed specific assertions for gpt-5-nano and provider matching. Replaced with generalized reasoning model validation. Updated reasoning_effort semantics: "minimal" for gpt-5\* models, "low" for others. Adjusted usage assertions and reasoning_tokens expectations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • smakosh

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "test(apps): update auto-routing reasoning_effort test" accurately and directly describes the main change in the pull request. The PR updates an end-to-end test for auto-routing reasoning effort to be more flexible and less tied to specific model selection, and the title captures this essence by stating it is an update to the auto-routing reasoning_effort test. The title is concise, clear, and specific enough that a teammate reviewing the commit history would quickly understand the primary change without being vague or overly broad.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot changed the title Update auto-routing reasoning effort test test(apps): update auto-routing reasoning_effort test Oct 21, 2025
@bunnyshell

bunnyshell Bot commented Oct 21, 2025

Copy link
Copy Markdown

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

@steebchen steebchen changed the title test(apps): update auto-routing reasoning_effort test test(gateway): update auto-routing reasoning_effort test Oct 21, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0ba3c04 and fbb4386.

📒 Files selected for processing (1)
  • apps/gateway/src/api-individual.e2e.ts (3 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Always use top-level import; never use require() or dynamic import()

Files:

  • apps/gateway/src/api-individual.e2e.ts
**/*.e2e.ts

📄 CodeRabbit inference engine (AGENTS.md)

End-to-end tests should be written in *.e2e.ts files

End-to-end test files should be named with the .e2e.ts suffix

Files:

  • apps/gateway/src/api-individual.e2e.ts
apps/gateway/src/api-individual.e2e.ts

📄 CodeRabbit inference engine (AGENTS.md)

Place isolated/individual E2E test cases that need isolation in apps/gateway/src/api-individual.e2e.ts

Place isolated E2E test cases that need separation in apps/gateway/src/api-individual.e2e.ts

Files:

  • apps/gateway/src/api-individual.e2e.ts
apps/{gateway,api}/**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

apps/{gateway,api}/**/*.ts: Use Hono for HTTP routing in Gateway and API services
Use Zod schemas for request/response validation in server routes

Files:

  • apps/gateway/src/api-individual.e2e.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Never use any or as any in this TypeScript project unless absolutely necessary
Always use top-level import; do not use require or dynamic import()

Files:

  • apps/gateway/src/api-individual.e2e.ts
{apps/{api,gateway}/**/*.ts,packages/db/**/*.ts}

📄 CodeRabbit inference engine (CLAUDE.md)

For read operations, use db().query.<table>.findMany() or db().query.<table>.findFirst()

Files:

  • apps/gateway/src/api-individual.e2e.ts
🧬 Code graph analysis (1)
apps/gateway/src/api-individual.e2e.ts (1)
packages/db/src/schema.ts (1)
  • log (340-418)

Comment thread apps/gateway/src/api-individual.e2e.ts
Comment thread apps/gateway/src/api-individual.e2e.ts Outdated
Update auto-routing test to properly validate that
reasoningEffort is set to "minimal" for gpt-5 models
and "low" for other reasoning models.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@steebchen
steebchen added this pull request to the merge queue Oct 21, 2025
Merged via the queue into main with commit a42531c Oct 21, 2025
13 of 14 checks passed
@steebchen
steebchen deleted the steebchen/reasoning-effort-test branch October 21, 2025 13:33
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.

1 participant