Skip to content

Perplexity API stops working with "invalid request" error #34468

Description

@TheNetos

Description

First of all, thanks for opencode, it's great!

Today, around 10 AM UTC, i started getting errors when making requests to the OpenAI, Anthropic, and Gemini models via the perplexity API:
invalid request: invalid tools in request: custom function name "..." is reserved

All responses from these models are in the screenshot below.

On logs is see errors (this is the first one):

timestamp=2026-06-29T10:19:21.039Z level=ERROR run=804a9322 message="stream error" providerID=perplexity-openai modelID=anthropic/claude-opus-4-8 session.id=ses_0ed1bfe5affefPZ39BHWQ01u5s small=false agent=plan mode=primary error.error="AI_APICallError: invalid request: invalid tools in request: custom function name \"bash\" is reserved"
timestamp=2026-06-29T10:19:21.042Z level=ERROR run=804a9322 message=process session.id=ses_0ed1bfe5affefPZ39BHWQ01u5s messageID=msg_f12e401bc002g9aQ6JirOMbvFr error="invalid request: invalid tools in request: custom function name \"bash\" is reserved" stack="AI_APICallError: invalid request: invalid tools in request: custom function name \"bash\" is reserved\n    at <anonymous> (/$bunfs/root/chunk-dwvrcch0.js:6:14583)\n    at async <anonymous> (/$bunfs/root/chunk-dwvrcch0.js:6:12790)\n    at processTicksAndRejections (native:7:39)"

Before that - all works good.

Plugins

None

OpenCode version

1.17.11

Steps to reproduce

  1. Setup perplexity-agent API by instructions
  2. Write smth
  3. ...

Screenshot and/or share link

Anthropic > OpenAI > Gemini

Anthropic>OpenAI>Gemini

Operating System

macOS 26.5

Terminal

iTerm2

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions