Skip to content

Let AI visibility setup and prompt generation run on Claude models - #444

Open
ephraimduncan wants to merge 1 commit into
every-app:mainfrom
ephraimduncan:fix/anthropic-structured-output-regex
Open

ephraimduncan wants to merge 1 commit into
every-app:mainfrom
ephraimduncan:fix/anthropic-structured-output-regex

Conversation

@ephraimduncan

Copy link
Copy Markdown

TL;DR

When OPENROUTER_MODEL selects a Claude model, AI visibility setup and "Generate prompts" stop with a 400 error. These features must run on Claude models in the same way as on the default GPT model.

What is happening?

The two features ask the model for structured output. The topic-name schema contains the regex ^\S+(?:\s+\S+){0,4}$, which limits a name to five words. Anthropic does not accept a range quantifier on a group, so Anthropic rejects every request:

output_config.format.schema: Unsupported regex feature in pattern field: Cannot apply a range quantifier to this regex.

OpenRouter tries Anthropic, Azure, and Vertex, and all three return this error. The setup screen then shows a failed run.

What should happen?

Setup and prompt generation complete on Claude models. Topic names still contain five words or fewer.

Extra context

The model now gets the topic schema without the regex. OpenSEO applies the five-word limit to the reply, in the same way that it already examines sourceUrl after generation. A regex with four optional groups is not sufficient: Anthropic accepts it in a small schema, but rejects the full research schema as "too complex for compilation". The default GPT model is not affected.

switchthelabel pushed a commit to switchthelabel/open-seo that referenced this pull request Oct 16, 2026
Anthropic structured output rejects the five-word regex on topic names.
Thus AI visibility setup and prompt generation stop with a 400 error
when OPENROUTER_MODEL selects a Claude model.

The model now gets a topic schema without the regex. OpenSEO still
applies the five-word limit to the reply.
@ephraimduncan
ephraimduncan force-pushed the fix/anthropic-structured-output-regex branch from fd8e715 to 51a4b5e Compare October 27, 2026 11:32
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