Hello everyone
- I am sending requests to the new GPT4.1. model via Langsmith playground (look at the picture).
- There is around 330000 tokens in the message
- From this I get an error with this message:
openai.BadRequestError: Error code: 400 - {‘error’: {‘message’: “This model’s maximum context length is 300000 tokens. However, your messages resulted in 330294 tokens (including 57 in the response_format schemas.). Please reduce the length of the messages or schemas.”, ‘type’: ‘invalid_request_error’, ‘param’: ‘messages’, ‘code’: ‘context_length_exceeded’}}
According to the documentation there should be 1M tokens am I right?
And yes I am 100% sure I am using GPT4.1. :
invocation_params
_type: “openai-chat”
model: “gpt-4.1-mini”
model_name: “gpt-4.1-mini”
response_format: “<class ‘backend.edmund.tools.eplan_tool.pydantic_models.RerankingFormat’>”
stop: null
stream: false
temperature: 0.1