Skip to content

panic when running Google Gemini #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Alonreznik opened this issue Apr 17, 2025 · 1 comment
Open

panic when running Google Gemini #30

Alonreznik opened this issue Apr 17, 2025 · 1 comment

Comments

@Alonreznik
Copy link

Alonreznik commented Apr 17, 2025

When running against the Google Gemini i get the next panic issue:

panic: interface conversion: interface {} is nil, not string

goroutine 113 [running]:
                                                                                                                github.com/mark3labs/mcphost/pkg/llm/google.propertyToGoogleSchema(0x140004be060)                                                                                                                           /Users/alonreznik/go/pkg/mod/github.com/mark3labs/[email protected]/pkg/llm/google/provider.go:145 +0x3ac   github.com/mark3labs/mcphost/pkg/llm/google.translateToGoogleSchema({{0x14000284f96, 0x6}, 0x1400043fe60, {0x140007801e0, 0x2, 0x2}})                                                                	/Users/alonreznik/go/pkg/mod/github.com/mark3labs/[email protected]/pkg/llm/google/provider.go:128 +0x1e4
                                                                  github.com/mark3labs/mcphost/pkg/llm/google.(*Provider).CreateMessage(0x14000703520, {0x103252d60, 0x103a355e0}, {0x1400045e180?, 0x1032466e8?}, {0x140006dbe80?, 0x1400060e3f0?, 0x0?}, {0x1400045c3c0, 0x4, ...})
/Users/alonreznik/go/pkg/mod/github.com/mark3labs/[email protected]/pkg/llm/google/provider.go:78 +0x344github.com/mark3labs/mcphost/cmd.runPrompt.func1()
/Users/alonreznik/go/pkg/mod/github.com/mark3labs/[email protected]/cmd/root.go:275 +0x60
github.com/charmbracelet/huh/spinner.(*Spinner).Run.func1()
/Users/alonreznik/go/pkg/mod/github.com/charmbracelet/huh/[email protected]/spinner.go:159 +0x30                                                                
created by github.com/charmbracelet/huh/spinner.(*Spinner).Run in goroutine 1 /Users/alonreznik/go/pkg/mod/github.com/charmbracelet/huh/[email protected]/spinner.go:158 +0x17c

My command:

$> ~/go/bin/mcphost --google-api-key "MyToken" --debug -m google:gemini-2.0-flash
@gmlewis
Copy link
Contributor

gmlewis commented Apr 18, 2025

Maybe #31 will fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants