mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-10-22 18:03:10 +02:00
* fix(utilities): stop json-schema models warning about BaseModel-shadowing fields Tool schemas legitimately name arguments schema, json or copy. Pydantic warns that these shadow BaseModel attributes every time create_model_from_schema builds such a model, which clutters CLI and agent output when platform or MCP tools load. The fields already validate and dump under their own names, so silence only that warning, and only while building a model that has a colliding name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(utilities): serialize the shadow-warning filter swap across threads Two threads building colliding models could overlap their catch_warnings blocks; the later exit then restored a filter list that still held the earlier build's ignore rule, leaking it to every later model. A lock now serializes the swap. Also replace a class defined only for its warning with create_model in the test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(utilities): pin that rebuilt recursive models emit no shadow warning A recursive $defs schema builds one model incomplete and finishes it with model_rebuild outside the suppression context. Pydantic only warns while collecting fields at class creation, so the rebuild stays silent; this test keeps that true. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>