Skip to content

Refactor Google and Mistral reasoning stream transitions #50

Open

Description

@flore2003

Summary

Follow up on #47 by aligning the google-genai and mistral chat adapters with the same explicit reasoning-transition style used in the OpenAI adapter.

Motivation

Both adapters currently use a local closeReasoning() helper that mutates reducer state and conditionally returns an event. The OpenAI cleanup in #47 moved away from that pattern in favor of explicit state transitions and functional updates, which makes the reducer easier to follow.

Scope

  • refactor packages/google-genai/src/chat-adapter.ts
  • refactor packages/mistral/src/chat-adapter.ts
  • keep behavior unchanged
  • prefer local provider helpers unless a genuinely shared abstraction emerges across providers

Notes

Anthropic likely does not fit the same abstraction because its reasoning lifecycle is driven by explicit block start/stop events.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions