Skip to content

feat: register deepseek-v4.1-flash as a verified model #4941

Closed

Description

@juanmichelini

What

Promote deepseek-v4.1-flash to the managed default OpenHands Cloud model, replacing deepseek-v4-flash. This requires registering the new model in the SDK's verified-model tables so it is offered by self-hosted deployments and so the enterprise SaaS default (openhands/deepseek-v4.1-flash) resolves correctly.

Desired Behavior

The SDK's verified-model tables include deepseek-v4.1-flash so that:

  • self-hosted deployments offer it in the openhands/… model list, and
  • the enterprise SaaS default model openhands/deepseek-v4.1-flash resolves to a verified entry.

deepseek-v4.1-flash is dual-mode (thinking/non-thinking) and should use the same default feature settings as deepseek-v4-flash.

Acceptance Criteria

  • deepseek-v4.1-flash is present in VERIFIED_DEEPSEEK_MODELS and VERIFIED_OPENHANDS_MODELS.
  • deepseek/deepseek-v4.1-flash is present in SEND_REASONING_CONTENT_MODELS (dual-mode).
  • Existing deepseek-v4-flash and deepseek-v4-flash-vision-exp entries are retained.

This is the SDK half of a coordinated cross-repo release (enterprise migration, frontend label, saas-deploy env).


This issue was created by an AI agent (OpenHands) on behalf of @juanmichelini.

Activity

  1. added
    ready-for-dev
    on Sep 10, 2026
  2. github-actions commented on Sep 10, 2026

    @github-actions
    Contributor

    ✅ ready-for-dev label applied

    This issue meets the readiness criteria and is ready for contribution.
    A contributor can now open a PR that links this issue (Fixes #<number>).

    This is an automated check — no AI was used to generate this comment.

  3. removed
    ready-for-dev
    on Sep 10, 2026
  4. added
    ready-for-dev
    on Sep 10, 2026
  5. removed
    ready-for-dev
    on Sep 10, 2026
  6. added
    enhancement
    on Sep 10, 2026
  7. added
    ready-for-dev
    on Sep 10, 2026
  8. simonrosenberg commented on Sep 17, 2026

    @simonrosenberg
    Member

    Confirmed this as an observable reasoning-history loss in SDK 1.47.0, not only a missing verified-model entry. Adding the reproduction here because the existing acceptance criteria already cover this exact omission.

    Our live DeepSeek v4.1 Flash author events contain nonempty reasoning_content, but LLM._model_features().send_reasoning_content resolves to False. Message.to_chat_dict() consequently leaves that field out of subsequent assistant messages. The evaluation proxy does not merge reasoning into normal content. The issue also reproduces without the proxy or any model calls.

    from openhands.sdk.llm import Message, TextContent
    from openhands.sdk.llm.utils.model_features import get_features
    
    message = Message(
        role="assistant",
        content=[TextContent(text="Continue")],
        reasoning_content="Keep this reasoning across tool calls.",
    )
    for model in [
        "openrouter/deepseek/deepseek-v4-flash",
        "openrouter/deepseek/deepseek-v4.1-flash",
        "openai/openrouter/deepseek/deepseek-v4.1-flash",
        "deepseek/deepseek-v4.1-flash",
    ]:
        features = get_features(model)
        payload = message.to_chat_dict(
            cache_enabled=False,
            vision_enabled=False,
            function_calling_enabled=True,
            force_string_serializer=False,
            send_reasoning_content=features.send_reasoning_content,
        )
        print(model, features.send_reasoning_content, "reasoning_content" in payload)

    Actual output:

    openrouter/deepseek/deepseek-v4-flash True True
    openrouter/deepseek/deepseek-v4.1-flash False False
    openai/openrouter/deepseek/deepseek-v4.1-flash False False
    deepseek/deepseek-v4.1-flash False False
    

    Expected: True True for all four. The v4-specific strings in SEND_REASONING_CONTENT_MODELS do not match v4.1. The default branch still lacks the v4.1 entry when checked today.

    Suggested regression coverage: verify the resolved feature and the serialized outgoing assistant message for direct, OpenRouter, and OpenAI-compatible proxy aliases. Existing v4 models should retain their behavior.

    In the replay experiment, completed LLM requests account for 96–98% of measured completed LLM-plus-tool time, with many thousands of reasoning tokens per slow response. Losing prior reasoning is a plausible contributor to repeated thinking; we have not established causality or a speedup. We are testing a local registration workaround plus low reasoning, recorded as a combined change: https://github.com/OpenHands/dataset-utils/issues/81#issuecomment-5721040479.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementready-for-dev

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions