mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-06-29 23:41:12 +08:00
## Summary - Add custom `base_url` support to the Google Go model driver. - Preserve Google URL suffix configuration when creating custom base URL driver instances. - Validate Google chat/stream request inputs before constructing the SDK client. - Cover Google model listing, connection checks, base URL resolution, and request validation with focused tests. ## What changed - `GoogleModel.NewInstance` now returns a Google driver configured with the supplied base URL map. - Google SDK client creation now resolves configured base URLs through `genai.HTTPOptions.BaseURL`. - Base URL lookup supports configured regions, empty-region keys, and `default` fallback. - Google chat, streaming chat, embeddings, and model listing now reject blank API keys before creating SDK clients. - Google chat and streaming chat now reject blank model names locally, and streaming chat rejects a nil sender. - Existing message handling, embeddings, pagination, and provider errors are preserved. ## Why Google custom model instances could not use configured base URLs because `NewInstance` returned `nil` and the SDK client path ignored the driver base URL map. The request validation keeps invalid Google calls from reaching SDK client construction with blank credentials or incomplete chat inputs.