Skip to content

Conversation

@daspartho
Copy link

@daspartho daspartho commented Jan 17, 2026

Description

prime api context length error phrase isn't in the catch list.

prime api returns "This endpoint's maximum context length is..." not in context_length_phrases, so OverlongPromptError isn't raised and eval crashes instead of graceful handling.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Test improvement

Testing

  • All existing tests pass when running uv run pytest locally.
  • New tests have been added to cover the changes

Checklist

  • My code follows the style guidelines of this project as outlined in AGENTS.md
  • 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
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Additional Notes

one line change.


Note

Improves overlong-prompt error handling to cover Prime API responses.

  • In verifiers/envs/environment.py, extend context_length_phrases to include "this endpoint's maximum context length is", ensuring BadRequestError with this message is mapped to vf.OverlongPromptError rather than a generic failure.

Written by Cursor Bugbot for commit b7a3f44. This will update automatically on new commits. Configure here.

@CLAassistant
Copy link

CLAassistant commented Jan 17, 2026

CLA assistant check
All committers have signed the CLA.

@daspartho
Copy link
Author

other providers also have uncaught phrasings. happy to add those, or could consider a more robust way to catch.

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.

2 participants