Skip to content

feat(googeai): add withBaseURL func option#1477

Open
vladzabolotnyi wants to merge 1 commit into
tmc:mainfrom
vladzabolotnyi:feat/googleai/add-with-base-url-func-option
Open

feat(googeai): add withBaseURL func option#1477
vladzabolotnyi wants to merge 1 commit into
tmc:mainfrom
vladzabolotnyi:feat/googleai/add-with-base-url-func-option

Conversation

@vladzabolotnyi
Copy link
Copy Markdown

Purpose

This PR introduces the WithBaseURL functional option to the Google AI provider. Currently, the provider defaults to the standard Google API endpoints; to use a custom URL, developers are forced to manipulate the low-level opts.ClientOptions slice directly.

This change provides a high-level, developer-friendly interface consistent with our implementations for Anthropic, OpenAI, and other LLM providers.

What's Done

  • Added WithBaseURL(baseURL string) Option which utilizes option.WithEndpoint under the hood
  • Added TestGoogleAIGenerateContentWithCustomBaseURL to verify the option is correctly applied

How Tested

Tested using the project's internal httprr integration testing framework.

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.

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.

1 participant