Skip to content

Conversation

@bjoaquinc
Copy link
Contributor

@bjoaquinc bjoaquinc commented Jun 6, 2025

📝 Summary

Updated openai and anthropic to only include the reasoning config if using a reasoning model, because it throws errors with non-reasoning models.

🔍 Description of Changes

  • Added reasoning_effort, DEFAULT_REASONING_EFFORT, and is_reasoning_model for openai
  • Decoupled create_params from the .create() method of openai and anthropic
  • Only added in reasoning or thinking related config if model is reasoning or thinking, otherwise dont add it at all (I tried just passing in None or other null types but it kept throwing errors for non-reasoning models)

Note: Openai does not send back reasoning tokens for streaming but adding medium to the reasoning_effort does improve the output

📋 Checklist

  • I have read the contributor guidelines.
  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • I have added tests for the changes made.
  • I have run the code and verified that it works as expected.

📜 Reviewers

@mscolnick

@vercel
Copy link

vercel bot commented Jun 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 6, 2025 9:06pm

…ic and openai to fix the no-return-any test fail
@mscolnick mscolnick merged commit 60f4ae6 into marimo-team:main Jun 9, 2025
29 of 33 checks passed
@github-actions
Copy link

github-actions bot commented Jun 9, 2025

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.13.16-dev57

Light2Dark pushed a commit that referenced this pull request Jun 9, 2025
## 📝 Summary

<!--
Provide a concise summary of what this pull request is addressing.

If this PR fixes any issues, list them here by number (e.g., Fixes
#123).
-->

Updated openai and anthropic to only include the reasoning config if
using a reasoning model, because it throws errors with non-reasoning
models.

## 🔍 Description of Changes

<!--
Detail the specific changes made in this pull request. Explain the
problem addressed and how it was resolved. If applicable, provide before
and after comparisons, screenshots, or any relevant details to help
reviewers understand the changes easily.
-->
- Added reasoning_effort, DEFAULT_REASONING_EFFORT, and
is_reasoning_model for openai
- Decoupled create_params from the .create() method of openai and
anthropic
- Only added in reasoning or thinking related config if model is
reasoning or thinking, otherwise dont add it at all (I tried just
passing in None or other null types but it kept throwing errors for
non-reasoning models)

_Note: Openai does not send back reasoning tokens for streaming but
adding medium to the reasoning_effort does improve the output_

## 📋 Checklist

- [x] I have read the [contributor
guidelines](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md).
- [ ] For large changes, or changes that affect the public API: this
change was discussed or approved through an issue, on
[Discord](https://marimo.io/discord?ref=pr), or the community
[discussions](https://github.com/marimo-team/marimo/discussions) (Please
provide a link if applicable).
- [ ] I have added tests for the changes made.
- [x] I have run the code and verified that it works as expected.

## 📜 Reviewers

<!--
Tag potential reviewers from the community or maintainers who might be
interested in reviewing this pull request.

Your PR will be reviewed more quickly if you can figure out the right
person to tag with @ -->

@mscolnick
@bjoaquinc bjoaquinc deleted the update-reasoning-for-openai-anthropic branch June 10, 2025 01:39
sebbeutler pushed a commit to sebbeutler/marimo that referenced this pull request Jun 28, 2025
## 📝 Summary

<!--
Provide a concise summary of what this pull request is addressing.

If this PR fixes any issues, list them here by number (e.g., Fixes
marimo-team#123).
-->

Updated openai and anthropic to only include the reasoning config if
using a reasoning model, because it throws errors with non-reasoning
models.

## 🔍 Description of Changes

<!--
Detail the specific changes made in this pull request. Explain the
problem addressed and how it was resolved. If applicable, provide before
and after comparisons, screenshots, or any relevant details to help
reviewers understand the changes easily.
-->
- Added reasoning_effort, DEFAULT_REASONING_EFFORT, and
is_reasoning_model for openai
- Decoupled create_params from the .create() method of openai and
anthropic
- Only added in reasoning or thinking related config if model is
reasoning or thinking, otherwise dont add it at all (I tried just
passing in None or other null types but it kept throwing errors for
non-reasoning models)

_Note: Openai does not send back reasoning tokens for streaming but
adding medium to the reasoning_effort does improve the output_

## 📋 Checklist

- [x] I have read the [contributor
guidelines](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md).
- [ ] For large changes, or changes that affect the public API: this
change was discussed or approved through an issue, on
[Discord](https://marimo.io/discord?ref=pr), or the community
[discussions](https://github.com/marimo-team/marimo/discussions) (Please
provide a link if applicable).
- [ ] I have added tests for the changes made.
- [x] I have run the code and verified that it works as expected.

## 📜 Reviewers

<!--
Tag potential reviewers from the community or maintainers who might be
interested in reviewing this pull request.

Your PR will be reviewed more quickly if you can figure out the right
person to tag with @ -->

@mscolnick
sebbeutler pushed a commit to sebbeutler/marimo that referenced this pull request Jul 7, 2025
## 📝 Summary

<!--
Provide a concise summary of what this pull request is addressing.

If this PR fixes any issues, list them here by number (e.g., Fixes
marimo-team#123).
-->

Updated openai and anthropic to only include the reasoning config if
using a reasoning model, because it throws errors with non-reasoning
models.

## 🔍 Description of Changes

<!--
Detail the specific changes made in this pull request. Explain the
problem addressed and how it was resolved. If applicable, provide before
and after comparisons, screenshots, or any relevant details to help
reviewers understand the changes easily.
-->
- Added reasoning_effort, DEFAULT_REASONING_EFFORT, and
is_reasoning_model for openai
- Decoupled create_params from the .create() method of openai and
anthropic
- Only added in reasoning or thinking related config if model is
reasoning or thinking, otherwise dont add it at all (I tried just
passing in None or other null types but it kept throwing errors for
non-reasoning models)

_Note: Openai does not send back reasoning tokens for streaming but
adding medium to the reasoning_effort does improve the output_

## 📋 Checklist

- [x] I have read the [contributor
guidelines](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md).
- [ ] For large changes, or changes that affect the public API: this
change was discussed or approved through an issue, on
[Discord](https://marimo.io/discord?ref=pr), or the community
[discussions](https://github.com/marimo-team/marimo/discussions) (Please
provide a link if applicable).
- [ ] I have added tests for the changes made.
- [x] I have run the code and verified that it works as expected.

## 📜 Reviewers

<!--
Tag potential reviewers from the community or maintainers who might be
interested in reviewing this pull request.

Your PR will be reviewed more quickly if you can figure out the right
person to tag with @ -->

@mscolnick
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