Skip to content

Move the GPT-4 and GPT-5 calls to Luna 6 with low reasoning - #656

Merged
danielchalef merged 23 commits into
mainfrom
devin/1793816292-luna6-low-models
Nov 4, 2026
Merged

danielchalef merged 23 commits into
mainfrom
devin/1793816292-luna6-low-models

Conversation

@danielchalef

@danielchalef danielchalef commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Summary

This PR moves active GPT-4.x, GPT-4o, and GPT-5.x calls and defaults to gpt-6-luna with explicit low reasoning. It replaces #645.

Area Change
Ingestion and text-only calls Use reasoning_effort="low". Custom OpenAI-compatible providers remain neutral unless configured.
Python framework examples Use native Responses clients or small adapters that preserve reasoning items and tool outputs across turns.
TypeScript framework examples Select Responses and send low reasoning, including the explicit reasoning override that Mastra requires for GPT-6.
Benchmark defaults Update future runs. The tau2 user simulator replays encrypted reasoning through a local Responses adapter.

Luna tool calls use the Responses API because Chat Completions does not support these calls with low reasoning. The adapters request encrypted reasoning and replay each item before its matching function call. LiveKit keeps its native stateful Responses path; this PR does not add a stateless LiveKit adapter.

The ElevenLabs proxy uses stateless Responses requests. Each request must include the full input history. Requests with previous_response_id return HTTP 400 because the proxy does not store responses on the OpenAI server.

Historical benchmark results, datasets, frozen fixtures, notebook outputs, and changelog history remain unchanged. The unsupported Community Edition configuration in legacy/ also remains unchanged.

Tests

  • The ingestion make all check passed with 682 tests passed and 2 skipped.
  • All eight changed Python integrations passed Ruff, format checks, mypy, and their package tests.
  • Mocked tool-loop tests cover reasoning replay, function-call outputs, and later turns. CrewAI, AG2, AutoGen, and Strands include multiple tool rounds.
  • The proxy passed 9 mocked tests. The adapters also test removal of reasoning state when tool calls leave the input history.
  • The TypeScript integration lint, type, test, and build checks passed. The LangGraph and chunking example tests and type checks passed.
  • The Go chunking example passed go vet, go test, and golangci-lint.
  • The tau3 package passed 83 tests, Ruff, and Pyright. The LOCOMO request tests passed. No benchmark or evaluation job ran.
  • Notebook output, metadata, and cell-ID comparisons passed for all four changed notebooks.

Dependency audits still report advisories on unchanged Zod and LangSmith versions. This PR does not upgrade those dependencies.

devin-ai-integration Bot and others added 15 commits November 4, 2026 18:35
Co-Authored-By: Daniel Chalef <daniel@getzep.com>
- Text-only Chat Completions calls (zep-ingest OpenAILLM, chunking examples, quickstart and dashboard agents, AutoGen notebook) use gpt-6-luna and reasoning_effort "low". OpenAICompatibleLLM does not send reasoning_effort unless the caller sets it.
- Tool calls use the Responses API with low reasoning: the LangGraph notebook (ChatOpenAI use_responses_api), the OpenAI Agents SDK example (ModelSettings reasoning), and the ElevenLabs proxy, which now serves /v1/responses and restores reasoning items in tool loops.
- Add mocked tests for zep-ingest, the ElevenLabs proxy, and the Go chunking example.

Co-Authored-By: Daniel Chalef <daniel@getzep.com>
Use the Responses API in each framework. Keep reasoning data across tool turns where supported.

Co-Authored-By: Daniel Chalef <daniel@getzep.com>
The tool-capable LangGraph, Vercel AI, and Mastra examples use the Responses API with low reasoning effort. The text-only chunking example uses Chat Completions with reasoning_effort low. Mocked tests check the model, the endpoint, the reasoning setting, and the replay of reasoning items in tool loops.

Co-Authored-By: Daniel Chalef <daniel@getzep.com>
…roxy

- Forward instructions and previous_response_id without change, and append the Zep context only when Zep returns context. Do not add a default persona.
- Limit the reasoning item map to 1,000 calls and expire each entry after one hour.
- Add mocked tests for the no-context path, previous_response_id, and the map limits.

Co-Authored-By: Daniel Chalef <daniel@getzep.com>
Tool calls use the Responses API with low reasoning. The examples use stateless requests for Zero Data Retention. Mocked tests verify the tool round trips.

Co-Authored-By: Daniel Chalef <daniel@getzep.com>
Raise the LangChain core minimum to match LangGraph 1.2.5.

Co-Authored-By: Daniel Chalef <daniel@getzep.com>
The adapters replay saved reasoning items before each matching function call.

CrewAI examples do not request encrypted reasoning because its tool loop does not replay those items.

Co-Authored-By: Daniel Chalef <daniel@getzep.com>
Co-Authored-By: Daniel Chalef <daniel@getzep.com>
Co-Authored-By: Daniel Chalef <daniel@getzep.com>
Tool calls replay encrypted reasoning before each matching function call. The examples use the Responses API with low reasoning and store=False.

Co-Authored-By: Daniel Chalef <daniel@getzep.com>
The Strands example now captures and replays encrypted reasoning without response IDs. The tool-loop tests cover two turns and parallel calls.

Co-Authored-By: Daniel Chalef <daniel@getzep.com>
Co-Authored-By: Daniel Chalef <daniel@getzep.com>
The example now uses an explicit reasoning profile. The requests include encrypted reasoning and set server-side storage to false.

Co-Authored-By: Daniel Chalef <daniel@getzep.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access that start with 'Devin'.

  • Disable automatic comment, CI, and merge conflict monitoring

@socket-security

socket-security Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​ai-sdk/​openai@​3.0.72 ⏵ 3.0.13673 +110089 +198100
Addednpm/​@​types/​node@​22.20.51001008196100
Updatednpm/​@​langchain/​openai@​1.5.12 ⏵ 1.6.3100 +110010097100
Updatednpm/​@​langchain/​core@​1.2.10 ⏵ 1.2.20100 +1100100 +197 +2100

View full report

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Critical — Responses replies break CLI output and memory persistence
    examples/typescript/langgraph/agent.ts:29
    Enabling Responses produces structured content blocks, but the CLI still interpolates lastAIMessage.content, and ZepMemory.convertToZepMessage() only casts that content to string. Replies display as [object Object], and persistence sends an array where Zep expects text. Use lastAIMessage.text for display and normalize content before persistence. Add coverage through the CLI/persistence path.

  2. Critical — Response continuations reference responses that were never stored
    examples/python/elevenlabs-zep-example/llm-proxy/proxy_server.py:347
    Every request forces store=False, while previous_response_id is forwarded unchanged. A client continuing a response produced by this proxy cannot resolve that response on OpenAI’s server. The reasoning cache cannot repair this because restoration requires function-call items in input, whereas continuations can contain only tool outputs. Either reconstruct and replay the complete history locally or support stored responses explicitly. Test two consecutive requests using previous_response_id.

  3. Critical — Existing model overrides receive unsupported reasoning settings
    ingestion/src/zep_ingest/llm/openai.py:35–46
    Existing calls such as OpenAILLM(model="gpt-4o") now send reasoning_effort="low", causing requests to non-reasoning models to fail. Requiring callers to discover and add reasoning_effort=None breaks the existing override API. Apply the implicit default only to supported models, preserving explicit overrides, and add a regression test for a non-reasoning model.

Review was static; runtime dependencies were unavailable, and no network access was attempted.

devin-ai-integration Bot and others added 7 commits November 4, 2026 19:03
Co-Authored-By: Daniel Chalef <daniel@getzep.com>
Co-Authored-By: Daniel Chalef <daniel@getzep.com>
Co-Authored-By: Daniel Chalef <daniel@getzep.com>
Co-Authored-By: Daniel Chalef <daniel@getzep.com>
Co-Authored-By: Daniel Chalef <daniel@getzep.com>
Co-Authored-By: Daniel Chalef <daniel@getzep.com>
Co-Authored-By: Daniel Chalef <daniel@getzep.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 4 findings. Devin automatically fixed all 4 findings.

Fixed by Devin (4)
  • Example adapters retain every tool call — The adapters now remove reasoning entries when their matching tool calls leave the input history. The regression tests cover a new conversation and preserve the existing multi-round replay checks.
  • Tool continuations duplicate user turns — The proxy now persists a user turn only when it is the final input item. A tool continuation can replay an earlier user turn without adding it to Zep again. The mocked tests cover both the continuation and a later user turn.
  • Previous response IDs break continuations — The stateless proxy now rejects previous_response_id with HTTP 400 before any Zep or OpenAI call. Its documentation and tests require full input history instead of advertising a server-side continuation that cannot work with store=False.
  • Nonreasoning model overrides fail — The automatic default now applies low reasoning only to Luna. Other model overrides omit the parameter unless the caller sets it. The ingestion checks pass.

View findings in Devin Review · Follow Devin's work

Devin Review

Co-Authored-By: Daniel Chalef <daniel@getzep.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

The proxy persists a user turn only when it is the final input item. The tool-continuation test checks that the prior user turn is not added again. This change is in 5f33c86, with the helper name made explicit in 17f8316.

The example adapters now remove reasoning entries when the matching tool calls leave the input history. The new-conversation tests check that the maps are cleared. This change is in ee3937f, with the lifetime stated in the adapter docstrings in 17f8316.

@danielchalef
danielchalef merged commit 62a4b4e into main Nov 4, 2026
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant