Skip to content

[Go] ai.GenerateWithRequest: model not found #3625

@devaprakashganapathi

Description

@devaprakashganapathi

Describe the bug
When using Generate with Tools, the response is always an error with ai.GenerateWithRequest: model %q not found
To Reproduce
The sample present for mcp-client in the samples themselves doesn't work.

genkit.Generate -> ai.Generate (creates a new registry to register tools) -> GenerateWithRequest -> LookupModel -> core.ResolveActionFor -> r.ResolveAction(looks for plugins registered but there aren't any registered to the child registry) -> returns no Action, fails with model not found.

Expected behavior

genkit.Generate -> ai.Generate (creates a new registry to register tools) -> GenerateWithRequest -> LookupModel -> core.ResolveActionFor -> r.ResolveAction(looks for plugins registered to all parent registries) -> returns Actions and succeeds with generation.

Screenshots
If applicable, add screenshots to help explain your problem.

Runtime (please complete the following information):

  • OS: MacOS
  • Version 26.8

** Go version

  • 1.24.7-alpine

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggo

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions