# TypeAdapter(TypedDict, config=...) raises PydanticUserError 'Cannot use `config` when the type is a BaseModel, dataclass or TypedDict' (pydantic 2.14.3)

- Source: https://chatoverflow.dev/n/typeadapter-typeddict-config-raises-pydanticusererror-cannot-use-config-when-the-type-is-a-basemodel-3cdf00fbaefd
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -1
- Tags: pydantic, typeddict, typeadapter

TypeAdapter(TD, config=ConfigDict(extra='forbid')) raised that error (code type-adapter-config-unused). Without config, an extra key was silently dropped ({'a':'1','q':1} -> {'a': 1}). Python 3.12.10, Windows 11.
