Skip to main content
0 reactions

Fixed: “Items ‘device_code’, ‘user_code’, ‘verification_uri’ on TypedDict class ‘_DeviceCode’ are using the ReadOnly qualifier” in Rasa Pro

Card labelled Rasa Fix and titled ReadOnly Qualifier UserWarning, with the subtitle Why Rasa Pro 3.22.2 warns about TypedDict _DeviceCode on its first Claude call, and why you can ignore it, beside a warning sign and the facts From litellm 1.108.13 and Harmless, once per start.
The ReadOnly qualifier UserWarning in Rasa Pro 3.22.2.

After I upgraded the agent from the Rasa Tutorial to Rasa Pro 3.22.2, its first message printed a block of pydantic UserWarning lines in Terminal. The first one says:

OutputPlain text
/Users/user/my-rasa-agent/.venv/lib/python3.14/site-packages/pydantic/_internal/_generate_schema.py:1574: UserWarning: Items 'device_code', 'user_code', 'verification_uri' on TypedDict class '_DeviceCode' are using the `ReadOnly` qualifier. Pydantic will not protect items from any mutation on dictionary instances.
  warnings.warn(

Here’s where the warnings come from, why they don’t affect your agent, and what to do about them.

What I Was Doing

I was following Rasa Tutorial — Part 12: The Runtime Loop: How Mantle Handles a Turn on Rasa Pro 3.22.2 with Claude Sonnet 5.5. I started the agent with rasa inspect and sent its first message, Is there a branch in Riverton?, in the Rasa Inspector.

What I Expected

The usual log lines for a turn in Terminal and an answer in the Inspector, as on Rasa Pro 3.22.0.

What I Got

The agent answered as usual, but Terminal printed 13 UserWarning lines during the first call to Claude, each followed by warnings.warn(:

Terminal output after the first message: the mantle.turn.started log line, a warning about the unknown model name claude-sonnet-5-5, then four of the UserWarning lines from pydantic _generate_schema.py line 1574, about the TypedDict classes _DeviceCode, _AccessTokenPoll, _CopilotTokenPayload and _DeviceCodePayload using the ReadOnly qualifier, each followed by warnings.warn(.
The first of the 13 UserWarning lines, right after the turn starts.

All 13 warnings, as printed:

Output (the warning lines)Plain text
/Users/user/my-rasa-agent/.venv/lib/python3.14/site-packages/pydantic/_internal/_generate_schema.py:1574: UserWarning: Items 'device_code', 'user_code', 'verification_uri' on TypedDict class '_DeviceCode' are using the `ReadOnly` qualifier. Pydantic will not protect items from any mutation on dictionary instances.
/Users/user/my-rasa-agent/.venv/lib/python3.14/site-packages/pydantic/_internal/_generate_schema.py:1574: UserWarning: Items 'access_token', 'error' on TypedDict class '_AccessTokenPoll' are using the `ReadOnly` qualifier. Pydantic will not protect items from any mutation on dictionary instances.
/Users/user/my-rasa-agent/.venv/lib/python3.14/site-packages/pydantic/_internal/_generate_schema.py:1574: UserWarning: Items 'token', 'expires_at', 'endpoints' on TypedDict class '_CopilotTokenPayload' are using the `ReadOnly` qualifier. Pydantic will not protect items from any mutation on dictionary instances.
/Users/user/my-rasa-agent/.venv/lib/python3.14/site-packages/pydantic/_internal/_generate_schema.py:1574: UserWarning: Items 'device_code', 'user_code', 'verification_uri', 'expires_in', 'interval' on TypedDict class '_DeviceCodePayload' are using the `ReadOnly` qualifier. Pydantic will not protect items from any mutation on dictionary instances.
/Users/user/my-rasa-agent/.venv/lib/python3.14/site-packages/pydantic/_internal/_generate_schema.py:1574: UserWarning: Items 'access_token', 'error', 'error_description', 'interval' on TypedDict class '_AccessTokenPollPayload' are using the `ReadOnly` qualifier. Pydantic will not protect items from any mutation on dictionary instances.
/Users/user/my-rasa-agent/.venv/lib/python3.14/site-packages/pydantic/_internal/_generate_schema.py:1574: UserWarning: Item 'login' on TypedDict class '_GithubUserPayload' is using the `ReadOnly` qualifier. Pydantic will not protect items from any mutation on dictionary instances.
/Users/user/my-rasa-agent/.venv/lib/python3.14/site-packages/pydantic/_internal/_generate_schema.py:1574: UserWarning: Item 'api' on TypedDict class '_CopilotEndpointsPayload' is using the `ReadOnly` qualifier. Pydantic will not protect items from any mutation on dictionary instances.
/Users/user/my-rasa-agent/.venv/lib/python3.14/site-packages/pydantic/_internal/_generate_schema.py:1574: UserWarning: Item 'index' on TypedDict class 'ChatCompletionThinkingBlock' is using the `ReadOnly` qualifier. Pydantic will not protect items from any mutation on dictionary instances.
/Users/user/my-rasa-agent/.venv/lib/python3.14/site-packages/pydantic/_internal/_generate_schema.py:1574: UserWarning: Item 'index' on TypedDict class 'ChatCompletionRedactedThinkingBlock' is using the `ReadOnly` qualifier. Pydantic will not protect items from any mutation on dictionary instances.
/Users/user/my-rasa-agent/.venv/lib/python3.14/site-packages/pydantic/_internal/_generate_schema.py:1574: UserWarning: Item 'summary' on TypedDict class 'ChatCompletionReasoningItem' is using the `ReadOnly` qualifier. Pydantic will not protect items from any mutation on dictionary instances.
/Users/user/my-rasa-agent/.venv/lib/python3.14/site-packages/pydantic/_internal/_generate_schema.py:1574: UserWarning: Item 'index' on TypedDict class 'ChatCompletionThinkingBlock' is using the `ReadOnly` qualifier. Pydantic will not protect items from any mutation on dictionary instances.
/Users/user/my-rasa-agent/.venv/lib/python3.14/site-packages/pydantic/_internal/_generate_schema.py:1574: UserWarning: Item 'index' on TypedDict class 'ChatCompletionRedactedThinkingBlock' is using the `ReadOnly` qualifier. Pydantic will not protect items from any mutation on dictionary instances.
/Users/user/my-rasa-agent/.venv/lib/python3.14/site-packages/pydantic/_internal/_generate_schema.py:1574: UserWarning: Item 'summary' on TypedDict class 'ChatCompletionReasoningItem' is using the `ReadOnly` qualifier. Pydantic will not protect items from any mutation on dictionary instances.

The next messages printed none of them.

What I Checked

Why It Happens

Rasa Pro 3.22.2 calls Claude through litellm 1.108.13. On the first request, litellm loads its GitHub Copilot sign-in code, even though your agent doesn’t use GitHub Copilot, and builds pydantic checkers for its own chat-message types. Both describe their data with TypedDict classes that mark some items ReadOnly, and pydantic prints one warning for each class to say it won’t protect those items from changes.

Python loads a module only once per run, so the warnings appear once each time you start the agent, on its first call to Claude. UserWarning is Python’s category for warnings like this one: a note for developers, not an error (Python’s warnings module (opens in a new tab)).

The Fix

There’s nothing to change in your project. The warnings are about how litellm’s own code is written, not about your agent, and they don’t change how your agent works.

Don’t edit files inside .venv, and don’t change litellm’s version on its own: Rasa Pro 3.22.2 requires litellm 1.108.13, and reinstalling would replace any edit anyway.

After the Fix

With nothing changed, the agent answered the first message, and the next message in the same run printed only its usual log lines:

Terminal output for the next message in the same run: mantle.turn.started, the unknown model name warning, mantle.tool.dispatched for activate, mantle.hooks.execution and mantle.turn.completed with source phase_response_wait, and no UserWarning lines.
The next turn: no UserWarning lines.

The warnings come back only when you start the agent again, on its first call to Claude.

Common Mistakes

MistakeDo this instead
Taking the warnings for a failed upgradeLook below them: the turn completes and the agent answers.
Going back to Rasa Pro 3.22.0 to avoid themStay on 3.22.2. It’s a security release that fixes advisories in packages Rasa uses.
Editing litellm’s or pydantic’s files inside .venvLeave them as they are. Reinstalling replaces them anyway.
Upgrading litellm on its ownRasa Pro 3.22.2 requires litellm 1.108.13, and the newest litellm has the same code.

Troubleshooting

ProblemFix
The warnings appear again after you restart the agentThat’s expected: they print once each time the agent starts, on its first call to Claude.
You also see Unknown model name 'claude-sonnet-5-5'That warning is harmless too: why Rasa prints it.

FAQ

Is the ReadOnly warning dangerous?

No. It only says that pydantic won’t enforce read-only items in some of litellm’s data types. Your agent answers as usual.

Does my agent use GitHub Copilot?

No. litellm 1.108.13 loads its GitHub Copilot module for every request, whichever provider you use. Your agent still sends its requests to Claude.

Why do I see it only once?

Python loads each module once per run, and litellm builds each pydantic checker once. The warnings appear while that happens, on the agent’s first call to Claude.

Conclusion

The ReadOnly qualifier warnings in Rasa Pro 3.22.2 come from litellm 1.108.13: from its GitHub Copilot code, which it loads on the first request, and from its own chat-message types. They don’t affect your agent, so there’s nothing to fix in your project: leave the warnings, and leave the packages Rasa installs as they are.

Additional Resources

Rasa, Claude, GitHub Copilot and other names mentioned are trademarks of their respective owners. JD Bots isn’t affiliated with or endorsed by Rasa Technologies, Anthropic or GitHub.

0 comments