# Mishandling model configuration internally

**URL:** <https://community.crewai.com/t/mishandling-model-configuration-internally/4154>\
**Category:** CrewAI Community Support\
**Created:** [February 24, 2025, 11:13pm UTC](https://community.crewai.com/t/mishandling-model-configuration-internally/4154 "2025-02-24T23:13:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![achris7](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/achris7/32/850_2.png) [@achris7](https://community.crewai.com/u/achris7)\
**Post date:** [February 24, 2025, 11:13pm UTC](https://community.crewai.com/t/mishandling-model-configuration-internally/4154/1 "2025-02-24T23:13:22Z")

</div>

I’ve been trying to use a large context open ai model e.g. o3 but crewai seems to be mishandling the model. here’s the code:

llm = LLM(  
model=“openai/o3-mini”,  
temperature=0.5,  
max\_completion\_tokens=32768

and the error…  
Error: litellm.exceptions.BadRequestError: litellm.BadRequestError: OpenAIException - Error code: 400 - {‘error’: {‘message’: “Unsupported parameter: ‘max\_tokens’ is not supported with this model. Use ‘max\_completion\_tokens’ instead.”, ‘type’: ‘invalid\_request\_error’, ‘param’: ‘max\_tokens’, ‘code’: ‘unsupported\_parameter’}}

I’ve added max\_completion\_tokens and cleared the cache and tried funning again 4x…

---

<div class="post-metadata">

**Author:** ![achris7](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/achris7/32/850_2.png) [@achris7](https://community.crewai.com/u/achris7)\
**Post date:** [February 24, 2025, 11:23pm UTC](https://community.crewai.com/t/mishandling-model-configuration-internally/4154/2 "2025-02-24T23:23:22Z")

</div>

terminal output:  
15:22:51 - LiteLLM:INFO: utils.py:2825 -  
LiteLLM completion() model= gpt-4o-mini; provider = openai  
2025-02-24 15:22:51,536 - LiteLLM - INFO -  
LiteLLM completion() model= gpt-4o-mini; provider = openai

---

<div class="post-metadata">

**Author:** ![achris7](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/achris7/32/850_2.png) [@achris7](https://community.crewai.com/u/achris7)\
**Post date:** [February 24, 2025, 11:24pm UTC](https://community.crewai.com/t/mishandling-model-configuration-internally/4154/3 "2025-02-24T23:24:00Z")

</div>

right after that output another…

LiteLLM completion() model= o3-mini; provider = openai  
2025-02-24 15:23:20,802 - LiteLLM - INFO -  
LiteLLM completion() model= o3-mini; provider = openai

huh?
