All entries

    DeepSeek Responses API Migration: Test Message State Before Changing Endpoints

    Migrating to DeepSeek's Responses API? Test explicit conversation history, unsupported state parameters, tool pairing and streaming before changing production.

    A pixel-art API adapter desk where conversation cards must be carried into each request instead of disappearing into a remote memory box.
    Original GPT-generated pixel-art editorial illustration; conceptual artwork, not a product screenshot or test result.

    An endpoint named Responses does not guarantee every provider implements the same conversation-state features. DeepSeek documents its Responses API as stateless, with previous_response_id and conversation unsupported. Before changing a base URL, test the request history and tool-result flow your application actually relies on.

    Inventory behaviour, not just request fields

    List the features your current client depends on: stored conversation continuation, system or developer messages, tool calls, file references, streaming and structured output. For each, identify the provider's documented support. A compatibility table is more useful than assuming a shared SDK method means identical semantics.

    Keep a sanitised fixture for each feature. Use invented messages with easily checked facts, such as a user choosing a fictional project colour. This makes a state failure visible without exposing a real conversation. Record the model because support and role treatment can vary by model as well as endpoint.

    Test memory across two turns

    In a stateless pattern, the application supplies the context needed for the next request. A response identifier is not automatically a server-side conversation handle. DeepSeek explicitly documents unsupported state parameters, so a request can be accepted without establishing the memory behaviour you expected.

    Use a two-turn fixture: first state an invented fact, then ask for it using the intended history flow. Test once with the explicit required history and once without it. The difference should be understood before a real user relies on continuity. Do not mistake a model's lucky guess for stored state.

    EXPLAINED / SEQUENCE

    Carry the context your application needs

    A simplified stateless request pattern, not a claim that all response objects can be replayed unchanged across providers.

    Application

    1. History selection

      Retain the authorised messages and tool results needed for this turn.

    2. Protocol adapter

      Map them to the supported input format.

    Provider

    1. Independent request

      Process the supplied context under documented limits.

    2. Returned output

      Validate and store the result according to your application policy.

    THE KEY DISTINCTION

    An accepted request is not proof that unsupported conversation-state parameters took effect.

    Author-created explanatory diagram. Arrows show the process described in the article, not measured performance.

    Treat silent ignores as a compatibility risk

    The documentation says unsupported parameters may be ignored rather than rejected. That is convenient for basic client connection but risky for assumptions about storage, truncation or background execution. An HTTP success status proves acceptance of a request, not that every field changed behaviour.

    Scroll the table horizontally to see all columns.

    Treat silent ignores as a compatibility risk
    ContractTestFailure that a happy-path chat misses
    Conversation continuityTwo-turn invented factMissing state despite successful responses
    Tool pairingTool call followed by matching outputInvalid or lost call association
    Role handlingExplicit instruction hierarchy fixtureDifferent interpretation by model or adapter
    StreamingStart, content, completion and interruptionUI waits for an event that never arrives
    Context limitDeliberately bounded long inputUnsupported truncation assumption

    Keep the adapter explicit

    Map the application model to the provider's supported input items and output shapes. Do not pass every field from another provider's response back blindly. Preserve required tool-call identities and validate the pairing rules documented for the selected protocol.

    If your product needs a feature the provider does not support, implement a deliberate application-level equivalent where appropriate or reject the unsupported configuration. Do not create the appearance of stored conversations while losing necessary history between turns. Also review retention: application-managed history introduces storage responsibility on your side.

    Test failure and interruption paths

    Simulate a stream ending before completion, a tool failure and an oversized context. Check that the UI distinguishes partial output from a finished answer. Verify cancellation and bounded retry behaviour so a compatibility error does not become a repeated billable loop.

    For tool actions with side effects, use a disposable mock and inspect actual state. An assistant saying it changed something is not enough. A provider migration should preserve application authorisation and confirmation requirements rather than delegating them to a model's wording.

    Roll out behind a reversible boundary

    Keep the old adapter available while testing the new one with harmless fixtures and a limited intended workload. Compare correctness and errors before timing or cost. Record the provider, model and adapter versions that produced the result.

    After promotion, verify an end-to-end session with the real frontend and its intended history store. The best migration outcome is not merely that the first answer appears. It is that multi-turn context, tool outcomes, failure states and data handling remain understandable and correct under the new provider's actual contract.

    Frequently asked questions

    Can I rely on previous_response_id with DeepSeek's Responses API? Not according to the current compatibility guide, which describes the API as stateless and lists that parameter as unsupported. Send the context required by the supported request model.

    Will an unsupported parameter always produce an error? No. The documentation says unsupported parameters can be silently ignored. Test the resulting behaviour rather than using an HTTP success response as proof of feature support.

    Can I switch providers by changing only the base URL? Sometimes a simple request works, but conversation state, tools, roles, streaming and unsupported fields can differ. Run contract tests for the features your application actually uses.

    FURTHER READING

    Sources

    Technical references checked .

    END OF ENTRY / 139
    Eeshan Singh with Big Ben in London
    BEHIND THE JOURNAL

    Eeshan Singh

    I’m Eeshan Singh Pokharia, an AI Full Stack Developer and CoFounder of UltraFit360. I work across AI features, full-stack product development, and web and mobile experiences—from Figma and frontend interactions to the systems behind them.

    This is a compatibility-test guide using invented messages. It is not a report of a private migration, and no production prompts, stored conversations or customer identifiers appear in the examples.

    Meet the author
    THE CONVERSATION

    Your side of the story.