diff --git a/docs/MIGRATION.md b/docs/MIGRATION.md index 1761a32..02c64b8 100644 --- a/docs/MIGRATION.md +++ b/docs/MIGRATION.md @@ -149,4 +149,4 @@ agent, err := odek.New(odek.Config{ ## Cache / cost budgets -Cache usage fields come from the SDK (`Usage.Cache*`). Pin **go-llm-sdk v0.3.2+** so GPT-5.6 tools+reasoning stays on (`POST /v1/responses`) and cache-token parsing remains honest. +Cache usage fields come from the SDK (`Usage.Cache*`). Pin **go-llm-sdk v0.3.3+** so GPT-5.6 tools+reasoning stays on (`POST /v1/responses`), cache-token parsing remains honest, and DeepSeek thinking-mode tool loops replay `reasoning_content` instead of dropping it (v0.3.2 and older lose the key on turns where the provider elided reasoning, and the loop 400s from then on). diff --git a/docs/PROVIDERS.md b/docs/PROVIDERS.md index eb0b6d0..0c8f434 100644 --- a/docs/PROVIDERS.md +++ b/docs/PROVIDERS.md @@ -47,6 +47,15 @@ actually reasons, and a reasoning summary is streamed back. `thinking=disabled` stays on Chat Completions with `reasoning_effort: none`. The same Responses route is used for GPT-5.4/5.5 when an explicit thinking level is set. +**DeepSeek (`deepseek`, the default id):** thinking mode requires +`reasoning_content` to be replayed on every assistant turn of a request that +carries tools, including turns where the provider returned no reasoning of +its own, which happens on some turns. With go-llm-sdk v0.3.3+ odek echoes the +key on tool-carrying requests, so such a turn no longer serializes without it. +On v0.3.2 and older the key is dropped when empty and a long tool loop dies +mid-run with `400 ... The reasoning_content in the thinking mode must be +passed back to the API`, then fails on every later request in that loop. + ## odek knobs (not in the SDK) | Knob | Where | diff --git a/go.mod b/go.mod index 44408e7..09ec74a 100644 --- a/go.mod +++ b/go.mod @@ -11,4 +11,4 @@ require ( require golang.org/x/sys v0.47.0 -require github.com/BackendStack21/go-llm-sdk v0.3.2 +require github.com/BackendStack21/go-llm-sdk v0.3.3 diff --git a/go.sum b/go.sum index cb0c96c..f9c2e33 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,7 @@ github.com/BackendStack21/go-llm-sdk v0.3.2 h1:aUXa450t+eOtLmuNX6gOMSD4zZsGCKtaIaG1YDHmNxY= github.com/BackendStack21/go-llm-sdk v0.3.2/go.mod h1:Nhro6plQaVIIFajPhzp2dzz4rv4DFU/yXNEudChllyE= +github.com/BackendStack21/go-llm-sdk v0.3.3 h1:JlMQL8K7W+BVe7zjhP7MMYK5VNqmK38QlDrFjA7Pp2c= +github.com/BackendStack21/go-llm-sdk v0.3.3/go.mod h1:Nhro6plQaVIIFajPhzp2dzz4rv4DFU/yXNEudChllyE= github.com/BackendStack21/go-mcp v1.3.0 h1:55iJgiAgcptv+mQwWEHNaFqPJksPR6zn4beYjHk/Ea4= github.com/BackendStack21/go-mcp v1.3.0/go.mod h1:RKFw6nrl6ySQqqrR8KtG7HYZ/heyyjT8SjiEtlbTMY8= github.com/BackendStack21/go-vector v1.4.0 h1:Ssu5RDEt4Cr9A17/ogdfjeuaLFFNHASJBIEGpqKzAV0=