Skip to content

Switch models from Gemini 3.1 Pro to gemini-2.5-flash-native-audio with same session context #4940

@kalikichandu

Description

@kalikichandu
  • Scenario:
    • I'm building a chat bot which handles both text & audio input (separate endpoints) using Google ADK.
    • First user start a session with text and agents use Gemini 3.1 Pro model to generate answer.
    • Next user switches to Voice and then I'm trying to process it using gemini-2.5-flash-native-audio-preview-12-2025 with SessionResumptionConfig handle of text session_id.
    • Facing issue as - google.genai.errors.APIError: 1007 None. Invalid session handle.
    • I want to know how to handle switching between models but still leveraging the same session context. Please let me whether ADK supports this or any workaround on how to handle this.
    • If I pass Conversation history from old session manually it may work but how to map these new session_id and old session_id
  • error messages I'm facing:
    • if I pass handle of text session_id in SessionResumptionConfig then facing issue as - google.genai.errors.APIError: 1007 None. Invalid session handle.
    • If I just re-use the existing session without SessionResumptionConfig then facing - google.genai.errors.APIError: 1011 None. Internal error

Metadata

Metadata

Assignees

No one assigned

    Labels

    live[Component] This issue is related to live, voice and video chat

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions