Skip to content

Conversation

steebchen
Copy link
Member

Summary

  • Adds an end-to-end test for the auto model with reasoning_effort parameter
  • Verifies that the response includes reasoning_content when using the auto model
  • Ensures proper setup of organization credits and project mode for auto model routing
  • Validates response structure including usage tokens and reasoning tokens
  • Confirms that the auto model routes to a reasoning-capable model and returns expected logs

Changes

Test Enhancements

  • Added a new test case in api.e2e.ts:
    • Sets organization credits and project mode to credits to enable auto model routing
    • Sends a chat completion request with model: "auto" and reasoning_effort: "medium"
    • Checks HTTP status and validates the response JSON structure
    • Confirms presence and type of reasoning_content in the response message
    • Validates usage tokens including optional reasoning tokens
    • Verifies logs to ensure correct model routing and provider usage

Test plan

  • Run the new e2e test to verify that the auto model returns reasoning content
  • Confirm that all assertions on response structure and logs pass successfully
  • Ensure no regressions in existing e2e tests

🌿 Generated by Terry


ℹ️ Tag @terragon-labs to ask questions and address PR feedback

📎 Task: https://www.terragonlabs.com/task/e80df600-c79e-412c-876d-2fbc3f1b91e2

Add an end-to-end test in the gateway app to verify that the auto model
with reasoning_effort parameter returns reasoning_content as expected.
The test sets up the necessary credits mode, sends a chat completion
request, and validates the response structure including usage tokens and
reasoning_content presence.

Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
Copy link
Contributor

coderabbitai bot commented Sep 10, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch terragon/test-auto-model-reasoning-content

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 Add e2e test for auto model with reasoning_effort returning reasoning_content test: add e2e test for auto model Sep 10, 2025
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