# GPT-5 and GPT-6 keep their reasoning through tool calls on Responses

> Agno sends the tool-call follow-up for GPT-6 on OpenAIResponses, and for GPT-5 and GPT-6 on OpenRouterResponses, with the reasoning state the API needs, so those requests stop failing with missing reasoning-item errors.

- Published: 2026-10-08
- Author: Ayush Jha
- Categories: Changelog
- Canonical: https://www.agno.com/blog/gpt-5-and-gpt-6-keep-their-reasoning-through-tool-calls-on-responses
- Markdown: https://www.agno.com/blog/gpt-5-and-gpt-6-keep-their-reasoning-through-tool-calls-on-responses.md

Agno's `OpenAIResponses._using_reasoning_model()` now matches IDs starting with `gpt-6` next to `o3`, `o4-mini` and `gpt-5`, and `OpenRouterResponses` matches `openai/gpt-5` and `openai/gpt-6` next to `openai/o3` and `openai/o4`. That check decides how Agno sends the turn that returns a tool result.

For a reasoning model on OpenAI, Agno stores the response and continues from its `previous_response_id`, so the API still holds the reasoning item each tool call is tied to. OpenRouter is stateless, so Agno asks for `reasoning.encrypted_content` and replays that item with the call. When the check missed a model, the follow-up went out with neither and could fail with a missing reasoning-item error.

We built the request after one `lookup` tool call, with a stored response ID and an encrypted reasoning item on the assistant message, and printed the parameters each class sends.

```text
# Before (real output)
OpenAIResponses(id='gpt-6-sol')._using_reasoning_model() -> False
OpenRouterResponses(id='openai/gpt-5.6-luna')._using_reasoning_model() -> False
OpenRouterResponses(id='openai/gpt-6-sol')._using_reasoning_model() -> False
OpenAIResponses gpt-6-sol follow-up: {'store': None, 'previous_response_id': None, 'include': None}
OpenRouterResponses openai/gpt-6-sol follow-up: {'store': False, 'previous_response_id': None, 'include': None}

# Now (real output)
OpenAIResponses(id='gpt-6-sol')._using_reasoning_model() -> True
OpenRouterResponses(id='openai/gpt-5.6-luna')._using_reasoning_model() -> True
OpenRouterResponses(id='openai/gpt-6-sol')._using_reasoning_model() -> True
OpenAIResponses gpt-6-sol follow-up: {'store': True, 'previous_response_id': 'resp_previous', 'include': None}
OpenRouterResponses openai/gpt-6-sol follow-up: {'store': False, 'previous_response_id': None, 'include': ['reasoning.encrypted_content']}
```

`gpt-5` IDs on `OpenAIResponses` already matched and behave as before.

See the [OpenRouter tool use cookbook](https://github.com/agno-agi/agno/blob/main/cookbook/90_models/openrouter/responses/tool_use.py), and learn more about [OpenAI Responses](https://docs.agno.com/models/providers/native/openai/responses/overview) and [OpenRouter Responses](https://docs.agno.com/examples/models/openrouter/responses/overview) in the documentation.
