Python: New Feature: Python: allow a custom endpoint for the Google text search connector

Abierto
#14,773 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

@poojithparchuri-iiitk ya está trabajando en esto.

Desde el 18/11/2026.

  • #14816 de @poojithparchuri-iiitk — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
backend

Línea de trabajo

Read python/semantic_kernel/connectors/google_search.py, especially CUSTOM_SEARCH_URL, GoogleSearchSettings, and GoogleSearch.__init__; then inspect the request construction and nearby connector tests. Add an optional configurable endpoint with the existing URL as the default, and verify that a custom host is used while default behavior remains unchanged.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

.NET python triage

The Python GoogleSearch connector always calls the URL fixed in CUSTOM_SEARCH_URL (python/semantic_kernel/connectors/google_search.py line 35) and builds every request from it (line 264). GoogleSearchSettings (line 126) holds only api_key and engine_id, so there is no way to send the same request to another host.

Google's Custom Search JSON API overview says the API is closed to new customers and that existing customers "have until January 1, 2027 to transition to an alternative solution". Teams on this connector will need to change where it points.

Proposal:

  • an optional base_url argument on GoogleSearch.__init__, beside api_key and search_engine_id
  • a matching base_url field on GoogleSearchSettings (GOOGLE_SEARCH_BASE_URL)
  • default CUSTOM_SEARCH_URL, so current behavior does not change

.NET can do this today: GoogleTextSearch takes a BaseClientService.Initializer (dotnet/src/Plugins/Plugins.Web/Google/GoogleTextSearch.cs line 46), whose BaseUri reaches CustomSearchAPIService at line 54. Bing follows the same pattern with options?.Endpoint ?? new Uri(DefaultUri) (dotnet/src/Plugins/Plugins.Web/Bing/BingTextSearch.cs line 38). If you want the shortcut in .NET as well, I can add GoogleTextSearchOptions.Endpoint mapped to Initializer.BaseUri.

We run SpecStream, a search API that serves the Custom Search request format, which is how we noticed.

Happy to send the PR with unit tests once you agree on the shape.

Tarek

Lenguaje dominante
C#
Estrellas
28.8k
Forks
4.9k
Merge medio
2 d 17 h
PR fusionados (30 d)
48

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/semantic-kernel

Todos los issues de microsoft/semantic-kernel

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.