Skip to content

Turnspan 7

Latest

Choose a tag to compare

@michaelgiraldo michaelgiraldo released this 21 Nov 18:38
1680fed

Package openai-chatkit 1.6.5+turnspan.7 · Python 3.14 · Tag v1.6.5+turnspan.7

Source commit 1680fed58b24021581622edd5c75073eb0194ca7.

Upgrading an app from Turnspan 6

Update the backend source pin and refresh your app's dependency lock. Python
3.14 remains the minimum. You can keep your existing ChatKit browser component.
Check the rows that apply to your backend.

If your app uses… What to change or verify
A custom thread store For browser reads (include_hidden=False), filter server-only items and ineligible pending browser tools before applying the cursor and limit. Compute after and has_more from visible items. Turnspan now rejects a page containing either hidden context type. Apply the same rule if your responder supplies paginated thread snapshots. Store guide
Forms Record which turn issued the form. In the same transaction that claims it, raise ConflictError and leave it pending if a different turn is ACCEPTED or RUNNING. This prevents an old form submission from interrupting a newer reply. SQLite example
Extra fields on AgentContext Unknown constructor keywords now raise a validation error. Move request-scoped values into request_context or declare typed fields on a subclass. App context guide
Agents SDK tools that pause for human approval Implement ChatKitServer.save_approval_checkpoint(thread, turn_id, checkpoint, context). Save the serialized run privately under the authenticated owner, thread, and turn. Forward ApprovalRequired if your responder filters events. A successful save puts the turn in WAITING. A missing hook or failed save produces FAILED. Approval example
Store tests for browser tools Run both check_thread_store and check_client_tool_store. The first now covers core storage and browser history. The second exercises browser tool callbacks. Store test example
An import of chatkit.widgets.MinMax Remove the import. If your app used this removed annotation for its own data, define the bounds type in your app. Chart JSON schemas are unchanged.
The agents extra Allow openai>=3.57.0,<4 in your app lock. The Agents SDK requirement remains openai-agents>=0.25.0,<0.26. Zensical 0.1.3 is a documentation build dependency.

Streaming and thread history

  • When a visitor leaves during a silent FastAPI stream, the server stops the
    producer. On ordinary streaming turns the partial reply survives reload, and
    the visitor can send another message.
  • If a responder streams Hi and then finishes building that same message,
    the saved reply reads Hi once. Turnspan also isolates streamed citations
    and workflow tasks from subsequent edits the responder hasn't sent.
  • Widget actions keep app and SDK hidden context out of browser replies.
    A private context update leaves an active progress display open while the
    agent continues working.
  • When the app replays thread history, Turnspan sends assistant text as model
    input and keeps the recorded Responses phase, such as commentary or
    final_answer. Stores that serialize individual fields should round-trip
    the optional assistant phase to preserve this behavior.

Optional reviewed replies

For an app that checks an answer before a visitor sees it, configure an Agents
SDK output guardrail and pass delivery="reviewed_text" to
stream_agent_response. The browser receives the approved final text in one
message. A rejection or disconnect during review keeps the candidate out of
the ChatKit transcript. Ordinary streaming remains the default for apps that
show intermediate events or use interactive browser tools.
Reviewed delivery guide

Install

python -m pip install 'openai-chatkit[agents,fastapi] @ https://github.com/michaelgiraldo/chatkit-python/archive/1680fed58b24021581622edd5c75073eb0194ca7.tar.gz'

Documentation for this commit · Pin and verify the installed build

Verification

  • Passing CI run

  • Locked versions in the SDK repository were OpenAI Python 3.57.0 and Agents SDK 0.25.0.

  • The consumer smoke ran on Python 3.14.10 with OpenAI Python 3.57.0 and Agents SDK 0.25.0. It exercised the quickstart, FastAPI, and mocked model HTTP from an isolated source install.

  • GitHub release verification installed the public source archive and passed all 42 consumer tests.