Skip to content

[BUG] Can't use GPT-5 model family - Unsupported parameter: temperature is not supported with this model. #874

Description

@aperepel

Bug Description

gpt-5-mini for model name, gpt-5-nano for small model. LLMConfig hardcodes the max_tokens parameter, which is rejected by gpt-5, as it replaced it with max_completion_tokens. The code is using a modern OpenAI client (not the OpenAI Generic compat one).

Steps to Reproduce

Provide a minimal code example that reproduces the issue:

llm_config = LLMConfig(
                    api_key=self._config['openai_api_key'],
                    base_url=self._config['openai_base_url'],
                    model=self._config['graphiti_model_name'],
                    small_model=self._config['graphiti_small_model_name'],
                    temperature=0.1
                    # omit max_tokens, it's hardcoded
                )

Expected Behavior

A clear and concise description of what you expected to happen.

Actual Behavior

Error on any attempt.

Environment

  • Graphiti Version: 0.18.9
  • OpenAI: 1.102.0
  • LLM Provider & Model: [e.g. OpenAI gpt-4.1, Anthropic claude-4-sonnet, Google gemini-2.5-flash]

Installation Method

  • pip install
  • uv add
  • Development installation (git clone)

Error Messages/Traceback

graphiti_core.llm_client.openai_base_client - ERROR - Error in generating LLM response: Error code: 400 - {'error': {'message': "Unsupported parameter: 'temperature' is not supported with this model.", 'type': 'invalid_request_error', 'param': 'temperature', 'code': None}}

Configuration

# Relevant configuration or initialization code

Additional Context

  • Does this happen consistently or intermittently?
  • Which component are you using? (core library, REST server, MCP server)
  • Any recent changes to your environment?
  • Related issues or similar problems you've encountered?

Possible Solution

If you have ideas about what might be causing the issue or how to fix it, please share them here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions