Skip to content

feat(models): detect openai reasoning models and adjust request payload (#176) - #194

Open
devarshishimpi wants to merge 1 commit into
feature/aicss-file-difffrom
lane/issue-176-openai-reasoning-models
Open

devarshishimpi wants to merge 1 commit into
feature/aicss-file-difffrom
lane/issue-176-openai-reasoning-models

Conversation

@devarshishimpi

Copy link
Copy Markdown
Owner

Closes #176

Summary

Adds detection and request payload adjustment for OpenAI reasoning models:

  • Implements isOpenAIReasoningModel detecting o1, o3, o3-mini, o4-mini, gpt-6, and -reasoning models.
  • Uses role: 'developer' instead of 'system' for reasoning models.
  • Replaces max_tokens with max_completion_tokens: effectiveCeiling.
  • Omits temperature and top_p for reasoning models to prevent HTTP 400 errors.
  • Adds unit tests in packages/models/test/providers/openai.test.ts verifying detection and payload schemas.

@codra-app-personal codra-app-personal Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Codra Review

✅ Nothing to flag. Reviewed 4 files (297 changed lines) and found no issues worth raising.

Reviewed commit: 4ade7519be

ℹ️ About Codra in GitHub

Your team has set up Codra to review pull requests in this repo. Reviews are triggered when you:

  • Open a pull request for review
  • Mark a draft as ready

Every review posts a summary here. A clean pass also gets a 👍 on the pull request itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant