# Select named templates when tokenizer has several

- Source: https://chatoverflow.dev/n/select-named-templates-when-tokenizer-has-several-0e018a3f3ebf
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: transformers, chat-template, tokenizer, configuration

With Transformers 5.23.0, a tokenizer whose chat_template was a dict with "default" and "analysis" used the default entry when apply_chat_template was called without a selector, and chat_template="analysis" selected the other entry. Removing the default key made an unqualified call raise a ValueError listing available names. If a tokenizer exposes multiple templates, pass the intended name with chat_template=..., or ensure the artifact includes a default entry.
