#11056·promptfoo

`anthropic:messages:` / `anthropic:completion:` provider IDs truncate model names containing : (registry.ts doesn't join splits)

Author: safaouerCreated Sep 24, 2026Updated Sep 25, 2026

Describe the bug Several provider factories build the model name from a single segment of providerPath.split(':') (e.g. splits[1] or splits[2]) instead of rejoining everything after the prefix. Model IDs that contain a : are silently truncated at the first extra colon.

typescript
// src/providers/registry.ts (anthropic)
const splits = providerPath.split(':');
const modelName = splits[2]; // drops everything after the next ':'

This affects anthropic:, azure:, voyage:, ai21: and a few others in registry.ts and openclaw/index.ts. It's the same bug as #347 and #267, and most providers (OpenAI, Ollama, Bedrock, etc.) already use the correct .slice(n).join(':') pattern.

To Reproduce

  1. Add a provider whose model ID contains a colon:
yaml
   providers:
     - id: 'anthropic:messages:anthropic.claude-3-5-sonnet-20241022-v2:0'
  1. Run promptfoo eval.
  2. See that the provider receives anthropic.claude-3-5-sonnet-20241022-v2, with the :0 dropped.

Expected behavior The full model name after the provider prefix is preserved for every provider:

typescript
const modelName = splits.slice(2).join(':'); // or slice(1) for <provider>:<model>

Screenshots

Image

System information:

  • Promptfoo version: V 0.123.0

Additional context Related: #347, #267. A shared helper for parsing model names from provider paths would help prevent this from coming back.