honcho/src/llm
Aakash Kattelu dea2917fa9
fix(openai): fix content normalization in openai backend history adapter (#1064)
* fix(llm): preserve null content on OpenAI tool-call turns

OpenAI-compatible providers can return assistant tool-call messages with
content=null. Coercing that to "" before history replay breaks providers
that bind opaque reasoning state to the exact assistant message shape.

Keep null only when the normalized response has tool calls; tool-less
null still becomes "", and content_override stays authoritative.

Fixes #1061

* test(live_llm): cover OpenAI null content tool-call replay

Add a live multi-turn tool replay that asserts provider content=null stays
null through normalize + OpenAIHistoryAdapter and that the continuation
still answers. Mark gpt_4/gpt_5 families as supports_tool_replay.

* docs(llm): note content_override None sentinel semantics

None means no override, not force-null content. Addresses review on #1064.
2026-08-26 12:14:32 -04:00
..
backends fix(openai): fix content normalization in openai backend history adapter (#1064) 2026-08-26 12:14:32 -04:00
__init__.py perf: lazy-load provider SDKs to cut idle memory per process (#1011) 2026-08-12 21:39:12 -04:00
api.py Track user and session ID on Langfuse traces (#814) 2026-06-23 00:03:21 -04:00
backend.py feat(telemetry): CloudEvents + Langfuse tracing as projections over a captured LLM stream (#845) 2026-07-02 16:49:53 -04:00
caching.py Refactor clients.py to add modern features and more flexible configuration (#459) 2026-04-20 02:46:37 -04:00
capture.py feat(telemetry): CloudEvents + Langfuse tracing as projections over a captured LLM stream (#845) 2026-07-02 16:49:53 -04:00
conversation.py Refactor clients.py to add modern features and more flexible configuration (#459) 2026-04-20 02:46:37 -04:00
credentials.py Refactor clients.py to add modern features and more flexible configuration (#459) 2026-04-20 02:46:37 -04:00
executor.py perf: lazy-load provider SDKs to cut idle memory per process (#1011) 2026-08-12 21:39:12 -04:00
history_adapters.py fix(llm): preserve reasoning content across tool turns (#1034) 2026-08-20 11:12:47 -04:00
registry.py perf: lazy-load provider SDKs to cut idle memory per process (#1011) 2026-08-12 21:39:12 -04:00
request_builder.py fix(llm): support per-request provider timeouts (#832) 2026-08-04 12:43:00 -04:00
runtime.py feat(telemetry): CloudEvents + Langfuse tracing as projections over a captured LLM stream (#845) 2026-07-02 16:49:53 -04:00
structured_output.py feat(llm backend): enable combined tool calling + structured output in the LLM backend transport layer (#907) 2026-07-15 11:47:49 -04:00
tool_loop.py fix(llm): preserve reasoning content across tool turns (#1034) 2026-08-20 11:12:47 -04:00
types.py perf: lazy-load provider SDKs to cut idle memory per process (#1011) 2026-08-12 21:39:12 -04:00