Skip to content

Runner using streaming enabled causes error when using gemini with tools #794

@gauAvenger

Description

@gauAvenger

Version v0.7.30

the relevant code pieces

agent := NewSupplierContractAgent(ctx, bearerToken)
runner := adk.NewRunner(ctx, adk.RunnerConfig{
		Agent:           agent,
		EnableStreaming: true,
		CheckPointStore: store.NewInMemoryStore(),
	})

	responseSchema := &einoSchema.Schema{}
	ChatModel, err = gemini.NewChatModel(ctx, &gemini.Config{

		ResponseJSONSchema: responseSchema,
		Client:             client,
		Model:              "gemini-3-flash-preview", // or gemini-1.5-pro, etc
		ThinkingConfig: &genai.ThinkingConfig{
			IncludeThoughts: false,
			ThinkingBudget:  nil,
		},
	})

	iter := runner.Run(ctx, []adk.Message{
		{

			Role:    schema.User,
			Content: "what are my contracts ",
		}},
		adk.WithCheckPointID("1"),
		adk.WithToolOptions([]tool.Option{authInput(bearerToken)}),
	)

error:
name: SupplierContractFinder
path: [{SupplierContractFinder}][FATAL] 2026-02-18 10:28:45 index is nil

when enablestreaming is false the code functions properly and my agent calls the tools, but when turned on it returns an index is nil and agent action is nil in the event. Is there any solution to getting gemini tool calls to work properly when enable streaming is true on the runner?

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