Repository navigation
Let AI visibility setup and prompt generation run on Claude models - #444
Open
ephraimduncan wants to merge 1 commit into
Open
ephraimduncan wants to merge 1 commit into
ephraimduncan wants to merge 1 commit into
Conversation
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
force-pushed
the
fix/anthropic-structured-output-regex
branch
from
October 27, 2026 11:32
fd8e715 to
51a4b5e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
When
OPENROUTER_MODELselects 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: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
sourceUrlafter 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.