vercel / vercel/vercel-plugin

Model-slug validator flags Anthropic canonical hyphen slugs (claude-opus-4-7, claude-sonnet-4-6) as typos expecting dots

Open
#60 0 comments 0 reactions 1 assignee View on GitHub

@Melkeydev is already working on this.

Since Apr 28, 2026.

Dominant language
TypeScript
Stars
287
Forks
58
Avg merge
1d 1h
Merged PRs (30d)
17

Description

TL;DR

The model-slug validation rule expects dot-separated version numbers (e.g., claude-opus-4.7) but Anthropic's canonical slugs are hyphen-separated (e.g., claude-opus-4-7). The validator fires a "model slug uses hyphens" warning on every file that references a current Anthropic model by its real API ID.

Plugin version: 0.24.0.

Evidence

Anthropic canonical slugs (from https://docs.anthropic.com/en/docs/about-claude/models):

  • claude-opus-4-7
  • claude-sonnet-4-6
  • claude-haiku-4-5-20251001

No dot-separated slugs exist in Anthropic's API surface. The hyphen form is canonical and is what the Anthropic SDK / API accepts.

Observed across multiple sessions spanning different repos (real Next.js + Vercel + Anthropic project as well as Claude Code governance/meta-work repo). Every Write/Edit of a file containing a current Anthropic model constant triggered this validator warning.

Where

Likely in overlay.yaml or the validation config that drives posttooluse-validate.mjs. The rule appears to enforce a provider-agnostic "use dots not hyphens" pattern for model slugs, but Anthropic's canonical form is the opposite.

Proposed fix

In order of preference:

  1. Remove the dot-vs-hyphen rule for Anthropic slugs. It's not a real constraint — there are no dot-separated Anthropic slugs in production. This eliminates the false positive cleanly.
  2. Update the rule's reference pattern to accept both separators for Anthropic models. Less preferred because it validates a pattern that doesn't exist in the provider's API.
  3. Narrow the rule to fire only when the slug clearly uses a non-canonical separator for the provider. Provider-aware validation.

Option 1 is the minimal correct fix. Anthropic updates its model family roughly every 6 weeks, so every version bump will continue to trip this rule until fixed.

Reproducer

// File: src/lib/models.ts
export const MODEL = 'claude-opus-4-7'
export const FAST = 'claude-haiku-4-5-20251001'

Write or edit this file through Claude Code with the plugin enabled. Validator emits "model slug uses hyphens — use dots" warnings on every line referencing these slugs.

Severity

Medium — compounds the noise problem documented in #38 (skill-injection overfires) and #59 (validator matches inside JSDoc/comment blocks). Each individual noise source is tolerable; the compound effect trains operators to ignore all plugin output, losing the real value.

Fix is small — a rule edit in the validation config. Would remove one full category of repeating false positive.

Workarounds currently in use

  1. Shell-level: ignore validator output on files containing model constants. Not good — discards real hits.
  2. Per-repo auto-memory note documenting the pattern so AI agents skip the warning. Not good — doesn't help human reviewers.

Neither workaround scales. The fix has to be upstream.

Related

  • #38 — architectural: skill injection noise compounds with validator noise → operator tunes out all plugin output.
  • #59posttooluse-validate.mjs matches regexes through JSDoc/comment blocks. Same class of over-matching.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.