agent-zero/plugins/_model_config/extensions/python
Alessandro 60c940fd03
Some checks failed
Build And Publish Docker Images / plan (push) Has been cancelled
Build And Publish Docker Images / build (push) Has been cancelled
fix(model-config): detect Claude models across providers
The Anthropic thoughts-prompt hook previously activated only when the
provider or model name contained "anthropic". Claude models exposed by
third-party or OpenAI-compatible providers without that identifier
therefore missed the prompt adaptation.

Extend the existing detection with a case-insensitive "claude" match
in the effective main model name, regardless of provider. Preserve the
existing "anthropic" match in either the provider or model name.

Keep the public-action-summary substitutions and prompt scope unchanged.
Preserve shared prompt templates, the thoughts JSON field, saved history,
custom wording, and native protocol projection. Do not change transport
error handling or suppress provider content-policy errors.

Add regression coverage for Claude-only model names across OpenRouter,
OpenAI-compatible, Vertex AI, Bedrock, and generic providers, plus mixed
case and negative cases. Update the plugin contract and README.

Validation:
- Reproduced five failing Claude-only cases before the fix.
- Passed 99 targeted prompt, model-config, and onboarding tests using
  /opt/venv-a0/bin/python.
- Passed git diff --check.

Live A0 API/provider behavior was not retested; this fixes the detection
gap but does not establish that every provider refusal is resolved.
2026-09-30 19:03:54 +02:00
..
_functions fix(model-config): detect Claude models across providers 2026-09-30 19:03:54 +02:00
banners Remove obsolete preset API key warning 2026-07-31 16:35:53 +02:00
startup_migration Prevent chat parameters from leaking into embeddings 2026-09-06 06:31:21 +02:00