websearch: tavily provider returns 403 (key rejected via Bearer auth)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 80/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- api
Línea de trabajo
Empieza en packages/core/src/plugin/websearch/tavily.ts, donde el proveedor actualmente envía Authorization: Bearer <key>. Compáralo con la solicitud documentada de Tavily con api_key en el cuerpo y reproduce el 403 usando la misma clave configurada. La corrección debería cambiar al método de autenticación aceptado o recurrir a él y mostrar un error más claro cuando falle la autenticación; hecho significa que una búsqueda web tiene éxito con una clave tvly-dev-.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
The built-in web search with provider tavily fails with HTTP 403 on every
search. The same API key works when sent as api_key in the request body, but
is rejected when sent as Authorization: Bearer <key> — which is how the
Tavily websearch provider sends it.
Environment
- opencode version: 2.4.1 (desktop app)
- OS: Windows 10.0.19045.6456 (win32 x64)
- websearch provider: tavily
- Tavily key:
tvly-dev-…(dev/free tier)
Reproduction
- Configure
websearch.provider = "tavily"and setTAVILY_API_KEY. - Ask the model to search the web.
- Observe:
Web search request failed (HTTP 403).
Expected Behavior
Web search returns results using the configured Tavily key.
Actual Behavior
Every search returns HTTP 403. Direct API tests with the same key (from the
same machine/IP) show:
POST https://api.tavily.com/searchwith{"api_key": "<key>", ...}
-> 200 OKPOST https://api.tavily.com/searchwith header
Authorization: Bearer <key>-> 403 Forbidden (HTML response)
The provider sends the key as a Bearer token
(packages/core/src/plugin/websearch/tavily.ts):
...(credential?.type === "key"
? { Authorization: `Bearer ${credential.key}` }
: { "X-Tavily-Access-Mode": "keyless" }),
So the 403 is Tavily rejecting Bearer auth for this key — not a network/VPN
issue and not an invalid key (the same key returns 200 via the body method).
Additional Context
- On another machine where only the Tavily MCP server is used (which sends the
key differently), no such error occurs. - A
tvly-dev-key may only support the legacyapi_key-in-body
authentication. If so, the provider could fall back to that method, or
surface a clearer error than a bare 403.
- Lenguaje dominante
- TypeScript
- Estrellas
- 228k
- Forks
- 31k
- Merge medio
- 3 h 22 min
- PR fusionados (30 d)
- 476
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de anomalyco/opencode
-
desktop: app-version.v1 in drafts.sqlite is never refreshed — reports 1.19.4 while running 2.3.2Abiertoarea/desktop platform/windows type/feature version/v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
anomalyco/opencode#66079 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area/mcp platform/windows status/repro-simulated type/bug version/v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
anomalyco/opencode#66073 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
claude-agent with a Claude subscription doesn't set cache.ttl, so warming pings every 4 minutesAbiertoarea/providers platform/windows type/feature version/v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
anomalyco/opencode#66001 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area/mcp platform/windows type/feature version/v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
anomalyco/opencode#65997 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
@opencode/ui: v2-text-text-faint and light v2-state-fg-warning fall below WCAG AA 4.5:1 contrastPosiblemente ocupada @KhadeerBasha1232 la tomó hoy. Abiertostatus/repro-plausible
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
anomalyco/opencode#65923 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de anomalyco/opencode
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
lidofinance/validator-ejector#233 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Los mantenedores suelen responder en 1 día
-
ai-driven-qa bug claude Major
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
linagora/twake-mail-admin#742 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
OpenSlides/openslides-client#6728 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 66/100