Skip to content

googleai: fix user provided embedding model getting overridden by default model #1307

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

Merged
merged 7 commits into from
Aug 19, 2025

Conversation

ancalabrese
Copy link
Contributor

@ancalabrese ancalabrese commented Jun 10, 2025

PR Checklist

  • Read the Contributing documentation.
  • Read the Code of conduct documentation.
  • Name your Pull Request title clearly, concisely, and prefixed with the name of the primarily affected package you changed according to Good commit messages (such as memory: add interfaces for X, Y or util: add whizzbang helpers).
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. Fixes #123).
  • Describes the source of new concepts.
  • References existing implementations as appropriate.
  • Contains test coverage for new functions.
  • Passes all golangci-lint checks.

This PR fixes an issue with the googleai client where the default embedding models were overriding the user provided embedding model.

  • Added options in the internal PaLM client to configure the models to use
  • Map the user provided options to the internal ones
  • Added a new WithGRPCConn option in the external googleai client:
    • This is needed to pass a mock grpc client to be able to test that the embedding request is using the user provided client

Fixes #1276

@tmc tmc merged commit ea5209c into tmc:main Aug 19, 2025
75 checks passed
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

Successfully merging this pull request may close these issues.

WithDefaultEmbeddingModel Option Not Working in Vertex AI Client
3 participants