Error On Openai api keys
If I select the OpenAI provider and enter the model as openai/gpt-5.3-codex or gpt-5.3-codex, it gives me the following error.”
litellm.exceptions.MidStreamFallbackError: litellm.ServiceUnavailableError: litellm.MidStreamFallbackError: litellm.APIConnectionError: APIConnectionError: OpenAIException - Error receiving chunk from stream: 1 validation error for ResponseCreatedEvent
Traceback (most recent call last): Traceback (most recent call last): File "/opt/venv-a0/lib/python3.12/site-packages/litellm/llms/base_llm/base_model_iterator.py", line 156, in anext chunk = await self.async_response_iterator.anext() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv-a0/lib/python3.12/site-packages/litellm/responses/streaming_iterator.py", line 176, in anext result = self._process_chunk(chunk) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv-a0/lib/python3.12/site-packages/litellm/responses/streaming_iterator.py", line 76, in _process_chunk self.responses_api_provider_config.transform_streaming_response( File "/opt/venv-a0/lib/python3.12/site-packages/litellm/llms/openai/responses/transformation.py", line 241, in transform_streaming_response return event_pydantic_model(**parsed_chunk) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv-a0/lib/python3.12/site-packages/pydantic/main.py", line 253, in init validated_self = self.pydantic_validator.validate_python(data, self_instance=self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pydantic_core._pydantic_core.ValidationError: 1 validation error for ResponseCreatedEvent response.reasoning.effort Input should be 'minimal', 'low', 'medium' or 'high' [type=literal_error, input_value='none', input_type=str] For further information visit https://errors.pydantic.dev/2.11/v/literal_error
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/opt/venv-a0/lib/python3.12/site-packages/litellm/litellm_core_utils/streaming_handler.py", line 1812, in anext async for chunk in self.completion_stream: File "/opt/venv-a0/lib/python3.12/site-packages/litellm/llms/base_llm/base_model_iterator.py", line 161, in anext raise RuntimeError(f"Error receiving chunk from stream: {e}") RuntimeError: Error receiving chunk from stream: 1 validation error for ResponseCreatedEvent response.reasoning.effort Input should be 'minimal', 'low', 'medium' or 'high' [type=literal_error, input_value='none', input_type=str] For further information visit https://errors.pydantic.dev/2.11/v/literal_error
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/opt/venv-a0/lib/python3.12/site-packages/litellm/litellm_core_utils/streaming_handler.py", line 1996, in anext raise exception_type( ^^^^^^^^^^^^^^^ File "/opt/venv-a0/lib/python3.12/site-packages/litellm/litellm_core_utils/exception_mapping_utils.py", line 2328, in exception_type raise e # it's already mapped ^^^^^^^ File "/opt/venv-a0/lib/python3.12/site-packages/litellm/litellm_core_utils/exception_mapping_utils.py", line 569, in exception_type raise APIConnectionError( litellm.exceptions.APIConnectionError: litellm.APIConnectionError: APIConnectionError: OpenAIException - Error receiving chunk from stream: 1 validation error for ResponseCreatedEvent response.reasoning.effort Input should be 'minimal', 'low', 'medium' or 'high' [type=literal_error, input_value='none', input_type=str] For further information visit https://errors.pydantic.dev/2.11/v/literal_error
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/a0/agent.py", line 454, in monologue agent_response, _reasoning = await self.call_chat_model( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/a0/agent.py", line 811, in call_chat_model response, reasoning = await model.unified_call( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/a0/models.py", line 521, in unified_call async for chunk in _completion: # type: ignore File "/opt/venv-a0/lib/python3.12/site-packages/litellm/litellm_core_utils/streaming_handler.py", line 2006, in anext raise MidStreamFallbackError( response.reasoning.effort Input should be 'minimal', 'low', 'medium' or 'high' [type=literal_error, input_value='none', input_type=str] For further information visit https://errors.pydantic.dev/2.11/v/literal_error Original exception: APIConnectionError: litellm.APIConnectionError: APIConnectionError: OpenAIException - Error receiving chunk from stream: 1 validation error for ResponseCreatedEvent response.reasoning.effort Input should be 'minimal', 'low', 'medium' or 'high' [type=literal_error, input_value='none', input_type=str] For further information visit https://errors.pydantic.dev/2.11/v/literal_error
volume_up
content_copy
open_in_full litellm.exceptions.MidStreamFallbackError: litellm.Servic... litellm.exceptions.MidStreamFallbackError: litellm.ServiceUnavailableError: litellm.MidStreamFallbackError: litellm.APIConnectionError: APIConnectionError: OpenAIException - Error receiving chunk from stream: 1 validation error for ResponseCreatedEvent
Traceback (most recent call last): Traceback (most recent call last): File "/opt/venv-a0/lib/python3.12/site-packages/litellm/llms/base_llm/base_model_iterator.py", line 156, in anext chunk = await self.async_response_iterator.anext() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv-a0/lib/python3.12/site-packages/litellm/responses/streaming_iterator.py", line 176, in anext result = self._process_chunk(chunk) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv-a0/lib/python3.12/site-packages/litellm/responses/streaming_iterator.py", line 76, in _process_chunk self.responses_api_provider_config.transform_streaming_response( File "/opt/venv-a0/lib/python3.12/site-packages/litellm/llms/openai/responses/transformation.py", line 241, in transform_streaming_response return event_pydantic_model(**parsed_chunk) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv-a0/lib/python3.12/site-packages/pydantic/main.py", line 253, in init validated_self = self.pydantic_validator.validate_python(data, self_instance=self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pydantic_core._pydantic_core.ValidationError: 1 validation error for ResponseCreatedEvent response.reasoning.effort Input should be 'minimal', 'low', 'medium' or 'high' [type=literal_error, input_value='none', input_type=str] For further information visit https://errors.pydantic.dev/2.11/v/literal_error
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/opt/venv-a0/lib/python3.12/site-packages/litellm/litellm_core_utils/streaming_handler.py", line 1812, in anext async for chunk in self.completion_stream: File "/opt/venv-a0/lib/python3.12/site-packages/litellm/llms/base_llm/base_model_iterator.py", line 161, in anext raise RuntimeError(f"Error receiving chunk from stream: {e}") RuntimeError: Error receiving chunk from stream: 1 validation error for ResponseCreatedEvent response.reasoning.effort Input should be 'minimal', 'low', 'medium' or 'high' [type=literal_error, input_value='none', input_type=str] For further information visit https://errors.pydantic.dev/2.11/v/literal_error
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/opt/venv-a0/lib/python3.12/site-packages/litellm/litellm_core_utils/streaming_handler.py", line 1996, in anext raise exception_type( ^^^^^^^^^^^^^^^ File "/opt/venv-a0/lib/python3.12/site-packages/litellm/litellm_core_utils/exception_mapping_utils.py", line 2328, in exception_type raise e # it's already mapped ^^^^^^^ File "/opt/venv-a0/lib/python3.12/site-packages/litellm/litellm_core_utils/exception_mapping_utils.py", line 569, in exception_type raise APIConnectionError( litellm.exceptions.APIConnectionError: litellm.APIConnectionError: APIConnectionError: OpenAIException - Error receiving chunk from stream: 1 validation error for ResponseCreatedEvent response.reasoning.effort Input should be 'minimal', 'low', 'medium' or 'high' [type=literal_error, input_value='none', input_type=str] For further information visit https://errors.pydantic.dev/2.11/v/literal_error
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/a0/agent.py", line 454, in monologue agent_response, _reasoning = await self.call_chat_model( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/a0/agent.py", line 811, in call_chat_model response, reasoning = await model.unified_call( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/a0/models.py", line 521, in unified_call async for chunk in _completion: # type: ignore File "/opt/venv-a0/lib/python3.12/site-packages/litellm/litellm_core_utils/streaming_handler.py", line 2006, in anext raise MidStreamFallbackError( response.reasoning.effort Input should be 'minimal', 'low', 'medium' or 'high' [type=literal_error, input_value='none', input_type=str] For further information visit https://errors.pydantic.dev/2.11/v/literal_error Original exception: APIConnectionError: litellm.APIConnectionError: APIConnectionError: OpenAIException - Error receiving chunk from stream: 1 validation error for ResponseCreatedEvent response.reasoning.effort Input should be 'minimal', 'low', 'medium' or 'high' [type=literal_error, input_value='none', input_type=str] For further information visit https://errors.pydantic.dev/2.11/v/literal_error
m i doing wrong something or this error belongs to agent zero
Can't get it to work with GPT either. I lost hours and all my Opus quota to find a solution and I failed. Giving up.
Closing due to inactivity of 90 days.