PluginProbe
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO / 2.7.0
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO v2.7.0
2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.10.0 All 48 releases
← All changes | includes/ai/class-openrouter-client.php +11 -0 2.2.02.7.0 View file →
@@ -196,8 +196,19 @@
196 196 * OpenRouter normalises `max_tokens` across very different underlying
197 197 * models, so we apply a single conservative ceiling rather than per-model
198 198 * limits.
199 199 *
200 + * Deliberately NOT given the per-model table Claude_Client gained in #665,
201 + * and still subject to the same truncation symptom as a result.
202 + *
203 + * That table is only safe for Claude because its model list is short, known
204 + * and verifiable. OpenRouter routes to arbitrary models from many providers
205 + * with no curated list here, and a ceiling guessed too high returns a
206 + * provider 400 rather than a smaller answer — a worse failure than the one
207 + * it would be fixing. Raising this needs either a per-model table sourced
208 + * from OpenRouter's own model metadata endpoint, or streaming so a large
209 + * budget cannot time out. Tracked separately; see #665.
210 + *
200 211 * @param string $model Model name
201 212 * @return int Maximum completion tokens
202 213 */
203 214 private function get_max_completion_tokens(string $model): int {