Repository Analysis

pydantic/pydantic-ai

AI Agent Framework, the Pydantic way

10.7 Low AI signal View on GitHub
10.7
Adjusted Score
10.7
Raw Score
100%
Time Factor
2026-05-30
Last Push
17,400
Stars
Python
Language
809,834
Lines of Code
1956
Files
7431
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 522MEDIUM 326LOW 6583

Pattern Findings

7431 matches across 19 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers5053 hits · 3696 pts
SeverityFileLineSnippet
LOWpydantic_ai_slim/pydantic_ai/_output.py108def _isinstance_maybe_generic(value: Any, type_: type[Any]) -> bool:
LOWpydantic_ai_slim/pydantic_ai/_output.py133async def run_output_validate_hooks(
LOWpydantic_ai_slim/pydantic_ai/_thinking_part.py6def split_content_into_text_and_thinking(content: str, thinking_tags: tuple[str, str]) -> list[ThinkingPart | TextPart]:
LOWpydantic_ai_slim/pydantic_ai/tool_manager.py155 def get_parallel_execution_mode(self, calls: list[ToolCallPart]) -> ParallelExecutionMode:
LOWpydantic_ai_slim/pydantic_ai/tool_manager.py505 async def validate_output_tool_call(
LOWpydantic_ai_slim/pydantic_ai/tool_manager.py830 async def resolve_deferred_tool_calls(
LOWpydantic_ai_slim/pydantic_ai/_instrumentation.py68def get_agent_run_baggage_attributes() -> dict[str, Any]:
LOWpydantic_ai_slim/pydantic_ai/_instrumentation.py113def model_request_parameters_attributes(
LOWpydantic_ai_slim/pydantic_ai/_instrumentation.py129def annotate_tool_call_otel_metadata(response: ModelResponse, parameters: ModelRequestParameters) -> None:
LOWpydantic_ai_slim/pydantic_ai/_instrumentation.py446 def get_output_tool_span_name(self, tool_name: str) -> str:
LOWpydantic_ai_slim/pydantic_ai/_tool_search.py371def _narrow_native_tool_search_call(part: NativeToolCallPart) -> NativeToolSearchCallPart:
LOWpydantic_ai_slim/pydantic_ai/_tool_search.py378def _narrow_native_tool_search_return(part: NativeToolReturnPart) -> NativeToolSearchReturnPart:
LOWpydantic_ai_slim/pydantic_ai/_tool_search.py392def _narrow_tool_search_return(part: ToolReturnPart) -> ToolSearchReturnPart:
LOWpydantic_ai_slim/pydantic_ai/_tool_search.py440def synthesize_local_from_native_call(part: NativeToolSearchCallPart) -> ToolSearchCallPart:
LOWpydantic_ai_slim/pydantic_ai/_tool_search.py452def synthesize_local_from_native_return(part: NativeToolSearchReturnPart) -> ToolSearchReturnPart:
LOWpydantic_ai_slim/pydantic_ai/_tool_search.py469def synthesize_local_tool_search_messages(messages: list[ModelMessage]) -> list[ModelMessage]:
LOWpydantic_ai_slim/pydantic_ai/_mcp.py129def map_from_sampling_content(
LOWpydantic_ai_slim/pydantic_ai/tools.py351def _deferred_tool_call_result_discriminator(x: Any) -> str | None:
LOWpydantic_ai_slim/pydantic_ai/tools.py428 def _named_required_fields_schema(self, named_required_fields: Sequence[tuple[str, bool, Any]]) -> JsonSchemaValue:
LOWpydantic_ai_slim/pydantic_ai/function_signature.py345 def get_conflicting_type_names(signatures: list[FunctionSignature]) -> frozenset[str]:
LOWpydantic_ai_slim/pydantic_ai/function_signature.py381 def collect_unique_referenced_types(signatures: list[FunctionSignature]) -> list[TypeSignature]:
LOWpydantic_ai_slim/pydantic_ai/function_signature.py494def _build_params_from_schema(
LOWpydantic_ai_slim/pydantic_ai/_warnings.py18def warn_on_prepare_callback_returned_none(prepare_func: Callable[..., object]) -> None:
LOWpydantic_ai_slim/pydantic_ai/_function_schema.py384def _extract_return_schema_type(return_annotation: Any, function: Callable[..., Any]) -> Any:
LOWpydantic_ai_slim/pydantic_ai/_spec.py36def serializes_as_string_keyed_dict(value: Any) -> bool:
LOWpydantic_ai_slim/pydantic_ai/_template.py90 def __get_pydantic_core_schema__(
LOWpydantic_ai_slim/pydantic_ai/_template.py168def _hint_contains_template_str(hint: Any) -> bool:
LOWpydantic_ai_slim/pydantic_ai/_template.py178def _import_pydantic_handlebars() -> Any:
LOWpydantic_ai_slim/pydantic_ai/result.py332 async def _stream_text_deltas_ungrouped() -> AsyncIterator[tuple[str, int]]:
LOWpydantic_ai_slim/pydantic_ai/result.py723 async def validate_structured_output(
LOWpydantic_ai_slim/pydantic_ai/result.py1064def _get_usage_checking_stream_response(
LOWpydantic_ai_slim/pydantic_ai/result.py1081def _get_deferred_tool_requests(
LOWpydantic_ai_slim/pydantic_ai/mcp.py1543 def __get_pydantic_core_schema__(cls, _: Any, __: Any) -> CoreSchema:
LOWpydantic_ai_slim/pydantic_ai/mcp.py1770 def __get_pydantic_core_schema__(cls, _: Any, __: Any) -> CoreSchema:
LOWpydantic_ai_slim/pydantic_ai/mcp.py1883 def __get_pydantic_core_schema__(cls, _: Any, __: Any) -> CoreSchema:
LOWpydantic_ai_slim/pydantic_ai/mcp.py2378 def _invalidate_resources_cache(self) -> None:
LOWpydantic_ai_slim/pydantic_ai/mcp.py2381 def _invalidate_prompts_cache(self) -> None:
LOWpydantic_ai_slim/pydantic_ai/mcp.py2765def _make_httpx_client_factory(
LOWpydantic_ai_slim/pydantic_ai/mcp.py2893def _mcp_server_discriminator(value: dict[str, Any]) -> str | None:
LOWpydantic_ai_slim/pydantic_ai/messages.py185def _multi_modal_content_identifier(identifier: str | bytes) -> str:
LOWpydantic_ai_slim/pydantic_ai/messages.py958def _infer_modality_from_media_type(media_type: str) -> Literal['image', 'audio', 'video'] | None:
LOWpydantic_ai_slim/pydantic_ai/messages.py969def _convert_binary_to_otel_part(
LOWpydantic_ai_slim/pydantic_ai/messages.py1265 def model_response_str_and_user_content(self) -> tuple[str, list[UserContent]]:
LOWpydantic_ai_slim/pydantic_ai/messages.py1996def _model_request_part_discriminator(v: Any) -> str | None:
LOWpydantic_ai_slim/pydantic_ai/messages.py2034def _model_response_part_discriminator(v: Any) -> str | None:
LOWpydantic_ai_slim/pydantic_ai/exceptions.py62 def __get_pydantic_core_schema__(cls, _: Any, __: Any) -> core_schema.CoreSchema:
LOWpydantic_ai_slim/pydantic_ai/direct.py38def _ensure_instruction_parts(
LOWpydantic_ai_slim/pydantic_ai/direct.py231def model_request_stream_sync(
LOWpydantic_ai_slim/pydantic_ai/direct.py358 def _check_context_manager_usage(self) -> None:
LOWpydantic_ai_slim/pydantic_ai/_parts_manager.py495 def _handle_embedded_thinking_start(
LOWpydantic_ai_slim/pydantic_ai/_parts_manager.py504 def _handle_embedded_thinking_content(
LOWpydantic_ai_slim/pydantic_ai/_parts_manager.py521 def _handle_embedded_thinking_end(self, vendor_part_id: VendorId) -> None:
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py142 def check_incomplete_tool_call(self) -> None:
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py355 async def _handle_deferred_tool_results(
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py402 async def _reevaluate_dynamic_prompts(
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py470async def _prepare_request_parameters(
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py1292 def _recover_text_from_message_history(message_history: list[_messages.ModelMessage]) -> str | None:
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py1427def _build_output_run_context(
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py1475def _emit_legacy_output_tool_function_events(
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py2062def get_captured_run_messages() -> _RunMessages:
4993 more matches not shown…
Cross-File Repetition202 hits · 1010 pts
SeverityFileLineSnippet
HIGHREADME.md0the first known use of "hello, world" was in a 1974 textbook about the c programming language.
HIGH…ai/.agents/skills/building-pydantic-ai-agents/SKILL.md0the first known use of "hello, world" was in a 1974 textbook about the c programming language.
HIGH…ttes/test_anthropic/test_anthropic_web_fetch_tool.yaml0the first known use of "hello, world" was in a 1974 textbook about the c programming language.
HIGH…ttes/test_anthropic/test_anthropic_web_fetch_tool.yaml0the first known use of "hello, world" was in a 1974 textbook about the c programming language.
HIGH…ttes/test_anthropic/test_anthropic_web_fetch_tool.yaml0the first known use of "hello, world" was in a 1974 textbook about the c programming language.
HIGH…ttes/test_anthropic/test_anthropic_web_fetch_tool.yaml0the first known use of "hello, world" was in a 1974 textbook about the c programming language.
HIGHdocs/index.md0the first known use of "hello, world" was in a 1974 textbook about the c programming language.
HIGHdocs/gateway.md0the first known use of "hello, world" was in a 1974 textbook about the c programming language.
HIGHdocs/gateway.md0the first known use of "hello, world" was in a 1974 textbook about the c programming language.
HIGHdocs/gateway.md0the first known use of "hello, world" was in a 1974 textbook about the c programming language.
HIGHdocs/gateway.md0the first known use of "hello, world" was in a 1974 textbook about the c programming language.
HIGHdocs/gateway.md0the first known use of "hello, world" was in a 1974 textbook about the c programming language.
HIGHdocs/logfire.md0the first known use of "hello, world" was in a 1974 textbook about the c programming language.
HIGHREADME.md0support_advice='hello john, your current account balance, including pending transactions, is $123.45.' block_card=false
HIGH…ttes/test_anthropic/test_anthropic_web_fetch_tool.yaml0support_advice='hello john, your current account balance, including pending transactions, is $123.45.' block_card=false
HIGH…ttes/test_anthropic/test_anthropic_web_fetch_tool.yaml0support_advice='hello john, your current account balance, including pending transactions, is $123.45.' block_card=false
HIGH…ttes/test_anthropic/test_anthropic_web_fetch_tool.yaml0support_advice='hello john, your current account balance, including pending transactions, is $123.45.' block_card=false
HIGH…ttes/test_anthropic/test_anthropic_web_fetch_tool.yaml0support_advice='hello john, your current account balance, including pending transactions, is $123.45.' block_card=false
HIGHdocs/index.md0support_advice='hello john, your current account balance, including pending transactions, is $123.45.' block_card=false
HIGHexamples/pydantic_ai_examples/bank_support.py0support_advice='hello john, your current account balance, including pending transactions, is $123.45.' block_card=false
HIGHREADME.md0support_advice="i'm sorry to hear that, john. we are temporarily blocking your card to prevent unauthorized transactions
HIGH…ttes/test_anthropic/test_anthropic_web_fetch_tool.yaml0support_advice="i'm sorry to hear that, john. we are temporarily blocking your card to prevent unauthorized transactions
HIGH…ttes/test_anthropic/test_anthropic_web_fetch_tool.yaml0support_advice="i'm sorry to hear that, john. we are temporarily blocking your card to prevent unauthorized transactions
HIGH…ttes/test_anthropic/test_anthropic_web_fetch_tool.yaml0support_advice="i'm sorry to hear that, john. we are temporarily blocking your card to prevent unauthorized transactions
HIGH…ttes/test_anthropic/test_anthropic_web_fetch_tool.yaml0support_advice="i'm sorry to hear that, john. we are temporarily blocking your card to prevent unauthorized transactions
HIGHdocs/index.md0support_advice="i'm sorry to hear that, john. we are temporarily blocking your card to prevent unauthorized transactions
HIGHexamples/pydantic_ai_examples/bank_support.py0support_advice="i'm sorry to hear that, john. we are temporarily blocking your card to prevent unauthorized transactions
HIGHpydantic_ai_slim/pydantic_ai/run.py0metadata associated with this agent run, if configured.
HIGHpydantic_ai_slim/pydantic_ai/run.py0metadata associated with this agent run, if configured.
HIGHpydantic_ai_slim/pydantic_ai/result.py0metadata associated with this agent run, if configured.
HIGHpydantic_ai_slim/pydantic_ai/result.py0metadata associated with this agent run, if configured.
HIGHpydantic_ai_slim/pydantic_ai/result.py0metadata associated with this agent run, if configured.
HIGHpydantic_ai_slim/pydantic_ai/_run_context.py0metadata associated with this agent run, if configured.
HIGHpydantic_ai_slim/pydantic_ai/run.py0the unique identifier for the conversation this run belongs to.
HIGHpydantic_ai_slim/pydantic_ai/run.py0the unique identifier for the conversation this run belongs to.
HIGHpydantic_ai_slim/pydantic_ai/result.py0the unique identifier for the conversation this run belongs to.
HIGHpydantic_ai_slim/pydantic_ai/result.py0the unique identifier for the conversation this run belongs to.
HIGHpydantic_ai_slim/pydantic_ai/result.py0the unique identifier for the conversation this run belongs to.
HIGHpydantic_ai_slim/pydantic_ai/run.py0return the messages produced during this run. messages provided via `message_history` and messages from older runs are e
HIGHpydantic_ai_slim/pydantic_ai/result.py0return the messages produced during this run. messages provided via `message_history` and messages from older runs are e
HIGHpydantic_ai_slim/pydantic_ai/result.py0return the messages produced during this run. messages provided via `message_history` and messages from older runs are e
HIGHpydantic_ai_slim/pydantic_ai/_tool_search.py0default tool name for the typed subclass. discrimination drives off `tool_kind`.
HIGHpydantic_ai_slim/pydantic_ai/_tool_search.py0default tool name for the typed subclass. discrimination drives off `tool_kind`.
HIGHpydantic_ai_slim/pydantic_ai/_tool_search.py0default tool name for the typed subclass. discrimination drives off `tool_kind`.
HIGHpydantic_ai_slim/pydantic_ai/_tool_search.py0default tool name for the typed subclass. discrimination drives off `tool_kind`.
HIGHpydantic_ai_slim/pydantic_ai/result.py0whether the stream has been cancelled via `cancel()`.
HIGHpydantic_ai_slim/pydantic_ai/result.py0whether the stream has been cancelled via `cancel()`.
HIGHpydantic_ai_slim/pydantic_ai/models/__init__.py0whether the stream has been cancelled via `cancel()`.
HIGHpydantic_ai_slim/pydantic_ai/result.py0return the usage of the whole run. !!! note this won't return the full usage until the stream is finished.
HIGHpydantic_ai_slim/pydantic_ai/result.py0return the usage of the whole run. !!! note this won't return the full usage until the stream is finished.
HIGHpydantic_ai_slim/pydantic_ai/result.py0return the usage of the whole run. !!! note this won't return the full usage until the stream is finished.
HIGHpydantic_ai_slim/pydantic_ai/mcp.py0see [mcp specification](https://modelcontextprotocol.io/specification/2025-11-25/basic#_meta) for notes on _meta usage.
HIGHpydantic_ai_slim/pydantic_ai/mcp.py0see [mcp specification](https://modelcontextprotocol.io/specification/2025-11-25/basic#_meta) for notes on _meta usage.
HIGHpydantic_ai_slim/pydantic_ai/mcp.py0see [mcp specification](https://modelcontextprotocol.io/specification/2025-11-25/basic#_meta) for notes on _meta usage.
HIGHpydantic_ai_slim/pydantic_ai/messages.py0part type identifier, this is available on all parts as a discriminator.
HIGHpydantic_ai_slim/pydantic_ai/messages.py0part type identifier, this is available on all parts as a discriminator.
HIGHpydantic_ai_slim/pydantic_ai/messages.py0part type identifier, this is available on all parts as a discriminator.
HIGHpydantic_ai_slim/pydantic_ai/messages.py0part type identifier, this is available on all parts as a discriminator.
HIGHpydantic_ai_slim/pydantic_ai/messages.py0part type identifier, this is available on all parts as a discriminator.
HIGHpydantic_ai_slim/pydantic_ai/messages.py0part type identifier, this is available on all parts as a discriminator.
142 more matches not shown…
Cross-Language Confusion205 hits · 984 pts
SeverityFileLineSnippet
HIGHpydantic_ai_slim/pydantic_ai/_json_schema.py195 # they are both null, so just return one of them
HIGHpydantic_ai_slim/pydantic_ai/models/openai.py2053 # Some OpenAI-compatible gateways (e.g. Bifrost) return text=null;
HIGHtests/test_temporal.py476 content='{"index": 0, "part": {"tool_name": "get_country", "args": "
HIGHtests/test_temporal.py479 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py482 content='{"index": 0, "part": {"tool_name": "get_country", "args": "
HIGHtests/test_temporal.py485 content='{"index": 1, "part": {"tool_name": "get_product_name", "arg
HIGHtests/test_temporal.py488 content='{"index": 1, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py491 content='{"index": 1, "part": {"tool_name": "get_product_name", "arg
HIGHtests/test_temporal.py580 content='{"index": 0, "part": {"tool_name": "get_weather", "args": "
HIGHtests/test_temporal.py583 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py586 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py589 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py592 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py595 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py598 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py601 content='{"index": 0, "part": {"tool_name": "get_weather", "args": "
HIGHtests/test_temporal.py661 content='{"index": 0, "part": {"tool_name": "final_result", "args":
HIGHtests/test_temporal.py664 content='{"tool_name": "final_result", "tool_call_id": null, "event_
HIGHtests/test_temporal.py667 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py670 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py673 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py676 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py679 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py682 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py685 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py688 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py691 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py694 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py697 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py700 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py703 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py706 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py709 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py712 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py715 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py718 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py721 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py724 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py727 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py730 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py733 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py736 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py739 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py742 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py745 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py748 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py751 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py754 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py757 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py760 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py763 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py766 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py769 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py772 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py775 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py778 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py781 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py784 content='{"index": 0, "delta": {"tool_name_delta": null, "args_delta
HIGHtests/test_temporal.py787 content='{"index": 0, "part": {"tool_name": "final_result", "args":
HIGHtests/test_temporal.py507 content='{"part": {"tool_name": "get_country", "args": "{}", "tool_call_id":
145 more matches not shown…
Unused Imports879 hits · 768 pts
SeverityFileLineSnippet
LOWpydantic_ai_slim/pydantic_ai/_output.py1
LOWpydantic_ai_slim/pydantic_ai/retries.py14
LOWpydantic_ai_slim/pydantic_ai/_thinking_part.py1
LOWpydantic_ai_slim/pydantic_ai/_uuid.py9
LOWpydantic_ai_slim/pydantic_ai/_enqueue.py7
LOWpydantic_ai_slim/pydantic_ai/run.py1
LOWpydantic_ai_slim/pydantic_ai/tool_manager.py1
LOWpydantic_ai_slim/pydantic_ai/format_prompt.py1
LOWpydantic_ai_slim/pydantic_ai/_instrumentation.py1
LOWpydantic_ai_slim/pydantic_ai/_tool_search.py23
LOWpydantic_ai_slim/pydantic_ai/_mcp.py1
LOWpydantic_ai_slim/pydantic_ai/tools.py1
LOWpydantic_ai_slim/pydantic_ai/_ssrf.py8
LOWpydantic_ai_slim/pydantic_ai/function_signature.py8
LOWpydantic_ai_slim/pydantic_ai/concurrency.py3
LOWpydantic_ai_slim/pydantic_ai/__init__.py4
LOWpydantic_ai_slim/pydantic_ai/__init__.py5
LOWpydantic_ai_slim/pydantic_ai/__init__.py5
LOWpydantic_ai_slim/pydantic_ai/__init__.py5
LOWpydantic_ai_slim/pydantic_ai/__init__.py5
LOWpydantic_ai_slim/pydantic_ai/__init__.py5
LOWpydantic_ai_slim/pydantic_ai/__init__.py5
LOWpydantic_ai_slim/pydantic_ai/__init__.py5
LOWpydantic_ai_slim/pydantic_ai/__init__.py5
LOWpydantic_ai_slim/pydantic_ai/__init__.py5
LOWpydantic_ai_slim/pydantic_ai/__init__.py16
LOWpydantic_ai_slim/pydantic_ai/__init__.py17
LOWpydantic_ai_slim/pydantic_ai/__init__.py17
LOWpydantic_ai_slim/pydantic_ai/__init__.py18
LOWpydantic_ai_slim/pydantic_ai/__init__.py18
LOWpydantic_ai_slim/pydantic_ai/__init__.py18
LOWpydantic_ai_slim/pydantic_ai/__init__.py18
LOWpydantic_ai_slim/pydantic_ai/__init__.py24
LOWpydantic_ai_slim/pydantic_ai/__init__.py24
LOWpydantic_ai_slim/pydantic_ai/__init__.py24
LOWpydantic_ai_slim/pydantic_ai/__init__.py24
LOWpydantic_ai_slim/pydantic_ai/__init__.py30
LOWpydantic_ai_slim/pydantic_ai/__init__.py30
LOWpydantic_ai_slim/pydantic_ai/__init__.py30
LOWpydantic_ai_slim/pydantic_ai/__init__.py30
LOWpydantic_ai_slim/pydantic_ai/__init__.py30
LOWpydantic_ai_slim/pydantic_ai/__init__.py30
LOWpydantic_ai_slim/pydantic_ai/__init__.py30
LOWpydantic_ai_slim/pydantic_ai/__init__.py30
LOWpydantic_ai_slim/pydantic_ai/__init__.py30
LOWpydantic_ai_slim/pydantic_ai/__init__.py30
LOWpydantic_ai_slim/pydantic_ai/__init__.py30
LOWpydantic_ai_slim/pydantic_ai/__init__.py30
LOWpydantic_ai_slim/pydantic_ai/__init__.py30
LOWpydantic_ai_slim/pydantic_ai/__init__.py30
LOWpydantic_ai_slim/pydantic_ai/__init__.py30
LOWpydantic_ai_slim/pydantic_ai/__init__.py30
LOWpydantic_ai_slim/pydantic_ai/__init__.py48
LOWpydantic_ai_slim/pydantic_ai/__init__.py49
LOWpydantic_ai_slim/pydantic_ai/__init__.py49
LOWpydantic_ai_slim/pydantic_ai/__init__.py49
LOWpydantic_ai_slim/pydantic_ai/__init__.py49
LOWpydantic_ai_slim/pydantic_ai/__init__.py49
LOWpydantic_ai_slim/pydantic_ai/__init__.py49
LOWpydantic_ai_slim/pydantic_ai/__init__.py49
819 more matches not shown…
Decorative Section Separators156 hits · 548 pts
SeverityFileLineSnippet
MEDIUMpydantic_ai_slim/pydantic_ai/function_signature.py33# =============================================================================
MEDIUMpydantic_ai_slim/pydantic_ai/function_signature.py35# =============================================================================
MEDIUMpydantic_ai_slim/pydantic_ai/function_signature.py90# =============================================================================
MEDIUMpydantic_ai_slim/pydantic_ai/function_signature.py92# =============================================================================
MEDIUMpydantic_ai_slim/pydantic_ai/function_signature.py432# =============================================================================
MEDIUMpydantic_ai_slim/pydantic_ai/function_signature.py434# =============================================================================
MEDIUMpydantic_ai_slim/pydantic_ai/function_signature.py757# =============================================================================
MEDIUMpydantic_ai_slim/pydantic_ai/function_signature.py759# =============================================================================
MEDIUM…ic_ai_slim/pydantic_ai/capabilities/instrumentation.py123 # ------------------------------------------------------------------
MEDIUM…ic_ai_slim/pydantic_ai/capabilities/instrumentation.py125 # ------------------------------------------------------------------
MEDIUM…ic_ai_slim/pydantic_ai/capabilities/instrumentation.py244 # ------------------------------------------------------------------
MEDIUM…ic_ai_slim/pydantic_ai/capabilities/instrumentation.py246 # ------------------------------------------------------------------
MEDIUM…ic_ai_slim/pydantic_ai/capabilities/instrumentation.py280 # ------------------------------------------------------------------
MEDIUM…ic_ai_slim/pydantic_ai/capabilities/instrumentation.py282 # ------------------------------------------------------------------
MEDIUM…ic_ai_slim/pydantic_ai/capabilities/instrumentation.py410 # ------------------------------------------------------------------
MEDIUM…ic_ai_slim/pydantic_ai/capabilities/instrumentation.py412 # ------------------------------------------------------------------
MEDIUMtests/test_temporal.py3233# ============================================================================
MEDIUMtests/test_temporal.py3235# ============================================================================
MEDIUMtests/test_temporal.py2744# ============================================================================
MEDIUMtests/test_temporal.py2747# ============================================================================
MEDIUMtests/test_temporal.py2790# ============================================================================
MEDIUMtests/test_temporal.py2793# ============================================================================
MEDIUMtests/test_temporal.py3144# ============================================================================
MEDIUMtests/test_temporal.py3146# ============================================================================
MEDIUMtests/test_function_signature.py577# =============================================================================
MEDIUMtests/test_function_signature.py579# =============================================================================
MEDIUMtests/test_function_signature.py679# =============================================================================
MEDIUMtests/test_function_signature.py681# =============================================================================
MEDIUMtests/test_function_signature.py1006# =============================================================================
MEDIUMtests/test_function_signature.py1008# =============================================================================
MEDIUMtests/test_streaming_errors.py211# ---------------------------------------------------------------------------
MEDIUMtests/test_streaming_errors.py213# ---------------------------------------------------------------------------
MEDIUMtests/test_streaming_errors.py330# ---------------------------------------------------------------------------
MEDIUMtests/test_streaming_errors.py332# ---------------------------------------------------------------------------
MEDIUMtests/test_streaming_errors.py439# ---------------------------------------------------------------------------
MEDIUMtests/test_streaming_errors.py441# ---------------------------------------------------------------------------
MEDIUMtests/test_streaming_errors.py527# ---------------------------------------------------------------------------
MEDIUMtests/test_streaming_errors.py529# ---------------------------------------------------------------------------
MEDIUMtests/test_streaming_errors.py625# ---------------------------------------------------------------------------
MEDIUMtests/test_streaming_errors.py627# ---------------------------------------------------------------------------
MEDIUMtests/test_streaming_errors.py721# ---------------------------------------------------------------------------
MEDIUMtests/test_streaming_errors.py723# ---------------------------------------------------------------------------
MEDIUMtests/test_streaming_errors.py931# ---------------------------------------------------------------------------
MEDIUMtests/test_streaming_errors.py933# ---------------------------------------------------------------------------
MEDIUMtests/test_streaming_errors.py166# ---------------------------------------------------------------------------
MEDIUMtests/test_streaming_errors.py168# ---------------------------------------------------------------------------
MEDIUMtests/test_streaming_errors.py757# ---------------------------------------------------------------------------
MEDIUMtests/test_streaming_errors.py759# ---------------------------------------------------------------------------
MEDIUMtests/test_streaming_errors.py846# ---------------------------------------------------------------------------
MEDIUMtests/test_streaming_errors.py848# ---------------------------------------------------------------------------
MEDIUMtests/test_thinking.py110# ---------------------------------------------------------------------------
MEDIUMtests/test_thinking.py112# ---------------------------------------------------------------------------
MEDIUMtests/test_thinking.py160# ---------------------------------------------------------------------------
MEDIUMtests/test_thinking.py162# ---------------------------------------------------------------------------
MEDIUMtests/test_thinking.py893# ---------------------------------------------------------------------------
MEDIUMtests/test_thinking.py895# ---------------------------------------------------------------------------
MEDIUMtests/test_thinking.py958# ---------------------------------------------------------------------------
MEDIUMtests/test_thinking.py960# ---------------------------------------------------------------------------
MEDIUMtests/test_thinking.py74# ---------------------------------------------------------------------------
MEDIUMtests/test_thinking.py76# ---------------------------------------------------------------------------
96 more matches not shown…
Magic Placeholder Names57 hits · 298 pts
SeverityFileLineSnippet
HIGHpydantic_ai_slim/pydantic_ai/common_tools/exa.py417 toolset = ExaToolset(api_key='your-api-key')
HIGHclai/README.md22export OPENAI_API_KEY='your-api-key-here'
HIGHtests/providers/test_ovhcloud.py32 provider = OVHcloudProvider(api_key='your-api-key')
HIGHtests/providers/test_ovhcloud.py36 assert provider.client.api_key == 'your-api-key'
HIGHtests/providers/test_ovhcloud.py52 openai_client = openai.AsyncOpenAI(api_key='your-api-key')
HIGHtests/providers/test_ovhcloud.py59 provider = OVHcloudProvider(api_key='your-api-key', http_client=http_client)
HIGHtests/providers/test_ovhcloud.py61 assert provider.client.api_key == 'your-api-key'
HIGHtests/providers/test_ovhcloud.py65 provider = OVHcloudProvider(api_key='your-api-key')
HIGHdocs/cli.md38export OPENAI_API_KEY='your-api-key-here'
HIGHdocs/embeddings.md115export OPENAI_API_KEY='your-api-key'
HIGHdocs/embeddings.md187 api_key='your-api-key',
HIGHdocs/embeddings.md221export GOOGLE_API_KEY='your-api-key'
HIGHdocs/embeddings.md322export CO_API_KEY='your-api-key'
HIGHdocs/embeddings.md378export VOYAGE_API_KEY='your-api-key'
HIGHdocs/retries.md297 api_key='your-api-key', # Replace with actual API key
HIGHdocs/models/xai.md22export XAI_API_KEY='your-api-key'
HIGHdocs/models/xai.md54provider = XaiProvider(api_key='your-api-key')
HIGHdocs/models/xai.md69xai_client = AsyncClient(api_key='your-api-key')
HIGHdocs/models/anthropic.md22export ANTHROPIC_API_KEY='your-api-key'
HIGHdocs/models/anthropic.md60 'claude-sonnet-4-5', provider=AnthropicProvider(api_key='your-api-key')
HIGHdocs/models/anthropic.md80 provider=AnthropicProvider(api_key='your-api-key', http_client=custom_http_client),
HIGHdocs/models/anthropic.md261 api_key='your-api-key',
HIGHdocs/models/groq.md22export GROQ_API_KEY='your-api-key'
HIGHdocs/models/groq.md55 'llama-3.3-70b-versatile', provider=GroqProvider(api_key='your-api-key')
HIGHdocs/models/groq.md73 provider=GroqProvider(api_key='your-api-key', http_client=custom_http_client),
HIGHdocs/models/openai.md20export OPENAI_API_KEY='your-api-key'
HIGHdocs/models/openai.md55model = OpenAIChatModel('gpt-5.2', provider=OpenAIProvider(api_key='your-api-key'))
HIGHdocs/models/openai.md90 api_key='your-api-key',
HIGHdocs/models/openai.md341 base_url='https://<openai-compatible-api-endpoint>', api_key='your-api-key'
HIGHdocs/models/openai.md367 base_url='https://<openai-compatible-api-endpoint>.com', api_key='your-api-key'
HIGHdocs/models/openai.md446 provider=AlibabaProvider(api_key='your-api-key'),
HIGHdocs/models/openai.md462 api_key='your-api-key',
HIGHdocs/models/openai.md496 api_key='your-api-key',
HIGHdocs/models/openai.md521 api_key='your-api-key',
HIGHdocs/models/openai.md544 api_key='your-api-key',
HIGHdocs/models/openai.md831 provider=OVHcloudProvider(api_key='your-api-key'),
HIGHdocs/models/openai.md865 provider=SambaNovaProvider(api_key='your-api-key'),
HIGHdocs/models/openai.md885 api_key='your-api-key',
HIGHdocs/models/bedrock.md22export AWS_BEARER_TOKEN_BEDROCK='your-api-key'
HIGHdocs/models/ollama.md25export OLLAMA_API_KEY='your-api-key' # required for Ollama Cloud
HIGHdocs/models/cohere.md22export CO_API_KEY='your-api-key'
HIGHdocs/models/cohere.md54model = CohereModel('command-r7b-12-2024', provider=CohereProvider(api_key='your-api-key'))
HIGHdocs/models/cohere.md71 provider=CohereProvider(api_key='your-api-key', http_client=custom_http_client),
HIGHdocs/models/mistral.md22export MISTRAL_API_KEY='your-api-key'
HIGHdocs/models/mistral.md55 'mistral-large-latest', provider=MistralProvider(api_key='your-api-key', base_url='https://<mistral-provider-endpoin
HIGHdocs/models/mistral.md73 provider=MistralProvider(api_key='your-api-key', http_client=custom_http_client),
HIGHdocs/models/cerebras.md22export CEREBRAS_API_KEY='your-api-key'
HIGHdocs/models/cerebras.md55 'llama-3.3-70b', provider=CerebrasProvider(api_key='your-api-key')
HIGHdocs/models/cerebras.md73 provider=CerebrasProvider(api_key='your-api-key', http_client=custom_http_client),
HIGHdocs/models/google.md34export GOOGLE_API_KEY=your-api-key
HIGHdocs/models/google.md53provider = GoogleProvider(api_key='your-api-key')
HIGHdocs/models/google.md124export GOOGLE_API_KEY=your-api-key
HIGHdocs/models/google.md143provider = GoogleCloudProvider(api_key='your-api-key')
HIGHdocs/models/google.md258 provider=GoogleProvider(api_key='your-api-key', http_client=custom_http_client),
HIGHdocs/examples/setup.md30 export OPENAI_API_KEY=your-api-key
HIGHdocs/examples/setup.md36 export GEMINI_API_KEY=your-api-key
HIGHdocs/examples/setup.md56OPENAI_API_KEY='your-api-key' \
Docstring Block Structure56 hits · 280 pts
SeverityFileLineSnippet
HIGHpydantic_ai_slim/pydantic_ai/_output.py374Execute an output function with error handling, converting `ModelRetry` to `ToolRetryError`. Tracing for output-fun
HIGHpydantic_ai_slim/pydantic_ai/retries.py169Handle an HTTP request with retry logic. Args: request: The HTTP request to handle. Return
HIGHpydantic_ai_slim/pydantic_ai/retries.py266Handle an async HTTP request with retry logic. Args: request: The HTTP request to handle.
HIGHpydantic_ai_slim/pydantic_ai/tool_manager.py473Execute a validated tool call via capability hooks. The Instrumentation capability (if present) creates trace s
HIGHpydantic_ai_slim/pydantic_ai/tool_manager.py779Handle a tool call by validating the arguments, calling the tool, and handling retries. This is a convenience m
HIGHpydantic_ai_slim/pydantic_ai/_ssrf.py250Validate that the URL uses an allowed protocol (http or https). Args: url: The URL to validate. Return
HIGHpydantic_ai_slim/pydantic_ai/_ssrf.py333Validate URL and resolve hostname to IP addresses. Performs protocol validation, DNS resolution, and IP validation.
HIGHpydantic_ai_slim/pydantic_ai/_ssrf.py443Download content from a URL with SSRF protection. This function: 1. Validates the URL protocol (only http/https
HIGHpydantic_ai_slim/pydantic_ai/mcp.py978Retrieve a specific prompt by name. Args: name: The name of the prompt to retrieve. arg
HIGHpydantic_ai_slim/pydantic_ai/mcp.py1034Call a tool on the server. Args: name: The name of the tool to call. args: The argument
HIGHpydantic_ai_slim/pydantic_ai/mcp.py1184Read the contents of a specific resource by URI. Args: uri: The URI of the resource to read, or a R
HIGHpydantic_ai_slim/pydantic_ai/mcp.py2657Read the contents of a specific resource by URI. Args: uri: The URI of the resource to read, or a [
HIGHpydantic_ai_slim/pydantic_ai/mcp.py2922Recursively expand environment variables in a JSON structure. Environment variables can be referenced using `${VAR_
HIGHpydantic_ai_slim/pydantic_ai/mcp.py2973Load MCP servers from a configuration file. Environment variables can be referenced in the configuration file using
HIGHpydantic_ai_slim/pydantic_ai/mcp.py3013Load `MCPToolset`s from a configuration file. The configuration file uses the same `mcpServers` JSON shape as Claud
HIGHpydantic_ai_slim/pydantic_ai/messages.py2396Apply this text delta to an existing `TextPart`. Args: part: The existing model response part, whic
HIGHpydantic_ai_slim/pydantic_ai/messages.py2459Apply this thinking delta to an existing `ThinkingPart`. Args: part: The existing model response pa
HIGHpydantic_ai_slim/pydantic_ai/messages.py2593Apply this delta to a part or delta, returning a new part or delta with the changes applied. Args:
HIGHpydantic_ai_slim/pydantic_ai/direct.py67Make a non-streamed request to a model. ```py title="model_request_example.py" from pydantic_ai import ModelReq
HIGHpydantic_ai_slim/pydantic_ai/direct.py120Make a Synchronous, non-streamed request to a model. This is a convenience method that wraps [`model_request`][pyda
HIGHpydantic_ai_slim/pydantic_ai/direct.py176Make a streamed async request to a model. ```py {title="model_request_stream_example.py"} from pydantic_ai imp
HIGHpydantic_ai_slim/pydantic_ai/direct.py239Make a streamed synchronous request to a model. This is the synchronous version of [`model_request_stream`][pydanti
HIGHpydantic_ai_slim/pydantic_ai/_parts_manager.py132Handle incoming text content, creating or updating a TextPart in the manager as appropriate. When `vendor_part_
HIGHpydantic_ai_slim/pydantic_ai/_parts_manager.py219Handle incoming thinking content, creating or updating a ThinkingPart in the manager as appropriate. When `vend
HIGHpydantic_ai_slim/pydantic_ai/_parts_manager.py302Handle or update a tool call, creating or updating a `ToolCallPart`, `NativeToolCallPart`, or `ToolCallPartDelta`.
HIGHpydantic_ai_slim/pydantic_ai/ui/vercel_ai/_utils.py85Dump provider metadata from keyword arguments. Args: wrapper_key: The key to wrap the metadata in. Defaults
HIGHpydantic_ai_slim/pydantic_ai/embeddings/__init__.py329Count the number of tokens in the given text. Args: text: The text to tokenize and count.
HIGHpydantic_ai_slim/pydantic_ai/embeddings/result.py86Get the embedding for an input by index or by the original input text. Args: item: Either an intege
HIGHpydantic_ai_slim/pydantic_ai/embeddings/base.py104Count the number of tokens in the given text. Args: text: The text to tokenize and count.
HIGHpydantic_ai_slim/pydantic_ai/models/cerebras.py119Transforms a 'CerebrasModelSettings' object into an 'OpenAIChatModelSettings' object. Args: model_settings:
HIGHpydantic_ai_slim/pydantic_ai/models/instrumented.py182Convert a list of model messages to OpenTelemetry events. Args: messages: The messages to convert.
HIGHpydantic_ai_slim/pydantic_ai/models/openrouter.py551Transforms a 'OpenRouterModelSettings' object into an 'OpenAIChatModelSettings' object. Args: model_setting
HIGHpydantic_ai_slim/pydantic_ai/models/bedrock.py250Insert a cache point before trailing document/video content. AWS rejects cache points that directly follow document
HIGHpydantic_ai_slim/pydantic_ai/models/_tool_choice.py17Resolve user-facing tool_choice into a canonical form for providers. Pydantic AI distinguishes between function too
HIGHpydantic_ai_slim/pydantic_ai/toolsets/fastmcp.py251Call a tool on the server. Args: name: The name of the tool to call. args: The argument
HIGHpydantic_evals/pydantic_evals/generation.py42Use an LLM to generate a dataset of test cases, each consisting of input, expected output, and metadata. This funct
HIGHpydantic_evals/pydantic_evals/dataset.py626Load a dataset from a file. Args: path: Path to the file to load. fmt: Format of the fi
HIGHpydantic_evals/pydantic_evals/dataset.py669Load a dataset from a string. Args: contents: The string content to parse. fmt: Format
HIGHpydantic_evals/pydantic_evals/dataset.py707Load a dataset from a dictionary. Args: data: Dictionary representation of the dataset.
HIGHpydantic_evals/pydantic_evals/dataset.py940Infer the format to use for a file based on its extension. Args: path: The path to infer the format
HIGHpydantic_evals/pydantic_evals/dataset.py1012Run a task on a case and return the context for evaluators. Args: task: The task to run. case: The
HIGHpydantic_evals/pydantic_evals/_utils.py50Get the name of a function, unwrapping partials and decorators. Args: func: The function to get the name of
HIGH…ntic_evals/pydantic_evals/evaluators/_run_evaluator.py39Run an evaluator and return the results. This function runs an evaluator on the given context and processes the res
HIGHpydantic_graph/pydantic_graph/mermaid.py53Generate [Mermaid state diagram](https://mermaid.js.org/syntax/stateDiagram.html) code for a graph. Args: g
HIGHpydantic_graph/pydantic_graph/graph.py348Generate a diagram representing the graph as [mermaid](https://mermaid.js.org/) diagram. This method calls [`py
HIGHpydantic_graph/pydantic_graph/join.py236Attempt to run the join node. Args: ctx: The graph execution context Returns:
HIGHpydantic_graph/pydantic_graph/step.py185Attempt to run the step node. Args: ctx: The graph execution context Returns:
HIGHpydantic_graph/pydantic_graph/step.py238Execute the wrapped node with the step context. Args: ctx: The step context containing the node ins
HIGHpydantic_graph/pydantic_graph/node.py82Force type variance for proper generic typing. This method exists solely for type checking purposes and should
HIGHpydantic_graph/pydantic_graph/graph_builder.py214Get the parent fork information for a join node. Args: join_id: The ID of the join node Re
HIGHpydantic_graph/pydantic_graph/graph_builder.py494Get the trace parent for instrumentation. Args: required: Whether to raise an error if no tracepare
HIGHpydantic_graph/pydantic_graph/graph_builder.py1544Create an edge path from a BaseNode class. This method integrates v1-style BaseNode classes into the v2 graph
HIGHpydantic_graph/pydantic_graph/graph_builder.py1598Create edges from a return type hint. This method analyzes return type hints from step functions or node method
HIGHpydantic_graph/pydantic_graph/graph_builder.py1666Build the final executable graph from the accumulated nodes and edges. This method performs validation, normali
HIGHpydantic_graph/pydantic_graph/graph_builder.py1899Find the dominating fork for each join node in the graph. This function analyzes the graph structure to find the pa
HIGHpydantic_graph/pydantic_graph/persistence/__init__.py154Record the run of the node, or error if the node is already running. Args: snapshot_id: The ID of t
Self-Referential Comments94 hits · 263 pts
SeverityFileLineSnippet
MEDIUMpydantic_ai_slim/pydantic_ai/concurrency.py203 # Create a span for observability while waiting
MEDIUMpydantic_ai_slim/pydantic_ai/_json_schema.py188 # Create a new schema based on the non-null part, mark as nullable
MEDIUMpydantic_ai_slim/pydantic_ai/_parts_manager.py1"""This module provides functionality to manage and update parts of a model's streamed response.
MEDIUMpydantic_ai_slim/pydantic_ai/providers/gateway.py1"""This module implements the Pydantic AI Gateway provider."""
MEDIUMpydantic_ai_slim/pydantic_ai/models/mistral.py140 # This class is a placeholder for any future mistral-specific settings
MEDIUMpydantic_ai_slim/pydantic_ai/models/__init__.py750 # This method is not required, but you need to implement it if you want to support `UsageLimits.count_tokens_bef
MEDIUMpydantic_ai_slim/pydantic_ai/models/__init__.py776 # This method is not required, but you need to implement it if you want to support streamed responses
MEDIUMpydantic_ai_slim/pydantic_ai/models/huggingface.py132 # This class is a placeholder for any future huggingface-specific settings
MEDIUMpydantic_ai_slim/pydantic_ai/models/cohere.py98 # This class is a placeholder for any future cohere-specific settings
MEDIUM…tic_ai_slim/pydantic_ai/durable_exec/prefect/_agent.py155 # Create a task to handle each event
MEDIUMtests/test_toolsets.py730 # Create a toolset with tools that can fail
MEDIUMtests/test_ui_web.py532 # Create a test HTML file
MEDIUMtests/test_ui_web.py545 # Create a test HTML file
MEDIUMtests/test_a2a.py52# Define a test Pydantic model
MEDIUMtests/test_a2a.py674 # Create a response with thinking part and text part
MEDIUMtests/test_temporal.py3245# Create a graph with parallel execution using the beta API
MEDIUMtests/test_temporal.py3935 # Create a minimal config without data_converter
MEDIUMtests/test_temporal.py3278# Create a join to collect results
MEDIUMtests/test_tenacity.py355 # Create a retry state with no exception
MEDIUMtests/test_tenacity.py369 # Create a retry state with a non-HTTP exception
MEDIUMtests/test_tenacity.py448 # Create a future date (30 seconds from now)
MEDIUMtests/test_tenacity.py474 # Create a past date
MEDIUMtests/test_tenacity.py499 # Create a future date (120 seconds from now, > max_wait)
MEDIUMtests/test_tenacity.py544 # Create a retry state with no exception to trigger fallback
MEDIUMtests/test_prefect.py1131 # Create a tuple with timestamps
MEDIUMtests/test_prefect.py1230 # Create an agent with a simple tool
MEDIUMtests/test_prefect.py1249 # Create an agent with a tool
MEDIUMtests/test_function_signature.py1030 # Create a function with bare generic annotation (typing.List, not list)
MEDIUMtests/test_usage_limits.py430 # Create a usage with None in details (simulating model response with missing detail)
MEDIUMtests/test_json_schema.py60 # Create a schema with $defs that should not be modified
MEDIUMtests/test_mcp.py2511 # Create a config with environment variables and extra fields containing primitives
MEDIUMtests/evals/test_evaluator_common.py258 # Create a mock GradingOutput
MEDIUMtests/evals/test_evaluator_common.py462 # Create a span tree with a known structure
MEDIUMtests/evals/test_evaluator_context.py19 # Create a mock span tree
MEDIUMtests/evals/test_evaluator_context.py22 # Create a context with all fields populated
MEDIUMtests/evals/test_evaluators.py562 # Create a span tree with a known structure
MEDIUMtests/evals/test_evaluators.py568 # Create a context with this span tree
MEDIUMtests/evals/test_evaluators.py102 # Create a spec
MEDIUMtests/evals/test_evaluators.py181 # Create a context with the correct object typing for IsInstance
MEDIUMtests/evals/test_evaluators.py204 # Create a context with DifferentOutput
MEDIUMtests/evals/test_reports.py111 # Create a new case
MEDIUMtests/evals/test_reports.py139 # Create a case aggregate
MEDIUMtests/evals/test_reports.py175 # Create an evaluator output
MEDIUMtests/evals/test_reports.py183 # Create a case
MEDIUMtests/evals/test_reports.py201 # Create a report with the error case
MEDIUMtests/evals/test_dataset.py1580 # This function is tough to test in an interesting way outside an example...
MEDIUMtests/evals/test_otel.py567 # Create a simple tree for testing negation
MEDIUMtests/evals/test_otel.py764 # Create a test span tree
MEDIUMtests/evals/test_otel.py799 # Create a tree with varying numbers of children
MEDIUMtests/providers/test_litellm.py41 # Create a proper mock profile object that can be updated
MEDIUMtests/providers/test_litellm.py139 # Create a real AsyncClient for the mock
MEDIUMtests/graph/test_graph.py457 # Create a mock span context manager
MEDIUMtests/graph/beta/test_graph_builder.py397 # Create a cycle that doesn't reach the end node
MEDIUMtests/models/test_anthropic.py548 # Create a mock model instance
MEDIUMtests/models/test_anthropic.py554 # Create a list with an unsupported param type (thinking)
MEDIUMtests/models/test_anthropic.py528 # Create a UserPromptPart with CachePoint
MEDIUMtests/models/test_anthropic.py808 # Create a mock client that looks like standard AsyncAnthropic
MEDIUMtests/models/test_anthropic.py6707 # Create a model instance
MEDIUMtests/models/test_anthropic.py6778 # Create a model instance
MEDIUMtests/models/test_anthropic.py6818 # Create a model instance
34 more matches not shown…
Deep Nesting278 hits · 234 pts
SeverityFileLineSnippet
LOWpydantic_ai_slim/pydantic_ai/_output.py133
LOWpydantic_ai_slim/pydantic_ai/_output.py1560
LOWpydantic_ai_slim/pydantic_ai/_output.py459
LOWpydantic_ai_slim/pydantic_ai/retries.py312
LOWpydantic_ai_slim/pydantic_ai/retries.py356
LOWpydantic_ai_slim/pydantic_ai/format_prompt.py135
LOWpydantic_ai_slim/pydantic_ai/format_prompt.py187
LOWpydantic_ai_slim/pydantic_ai/_instrumentation.py129
LOWpydantic_ai_slim/pydantic_ai/_tool_search.py469
LOWpydantic_ai_slim/pydantic_ai/_mcp.py20
LOWpydantic_ai_slim/pydantic_ai/_mcp.py69
LOWpydantic_ai_slim/pydantic_ai/function_signature.py494
LOWpydantic_ai_slim/pydantic_ai/function_signature.py345
LOWpydantic_ai_slim/pydantic_ai/_function_schema.py103
LOWpydantic_ai_slim/pydantic_ai/_spec.py95
LOWpydantic_ai_slim/pydantic_ai/result.py1081
LOWpydantic_ai_slim/pydantic_ai/result.py243
LOWpydantic_ai_slim/pydantic_ai/mcp.py2696
LOWpydantic_ai_slim/pydantic_ai/mcp.py2818
LOWpydantic_ai_slim/pydantic_ai/mcp.py2864
LOWpydantic_ai_slim/pydantic_ai/mcp.py1370
LOWpydantic_ai_slim/pydantic_ai/mcp.py2702
LOWpydantic_ai_slim/pydantic_ai/_json_schema.py58
LOWpydantic_ai_slim/pydantic_ai/messages.py642
LOWpydantic_ai_slim/pydantic_ai/messages.py837
LOWpydantic_ai_slim/pydantic_ai/messages.py1020
LOWpydantic_ai_slim/pydantic_ai/messages.py1152
LOWpydantic_ai_slim/pydantic_ai/messages.py1204
LOWpydantic_ai_slim/pydantic_ai/messages.py2237
LOWpydantic_ai_slim/pydantic_ai/messages.py2288
LOWpydantic_ai_slim/pydantic_ai/messages.py2458
LOWpydantic_ai_slim/pydantic_ai/_a2a.py134
LOWpydantic_ai_slim/pydantic_ai/_a2a.py219
LOWpydantic_ai_slim/pydantic_ai/_a2a.py261
LOWpydantic_ai_slim/pydantic_ai/_a2a.py286
LOWpydantic_ai_slim/pydantic_ai/_parts_manager.py121
LOWpydantic_ai_slim/pydantic_ai/_parts_manager.py292
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py438
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py470
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py1493
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py1818
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py1940
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py2176
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py256
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py355
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py402
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py602
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py1084
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py1292
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py1092
LOWpydantic_ai_slim/pydantic_ai/_utils.py271
LOWpydantic_ai_slim/pydantic_ai/_utils.py687
LOWpydantic_ai_slim/pydantic_ai/_utils.py310
LOWpydantic_ai_slim/pydantic_ai/ui/_event_stream.py155
LOWpydantic_ai_slim/pydantic_ai/ui/_adapter.py293
LOW…ntic_ai_slim/pydantic_ai/ui/vercel_ai/_event_stream.py358
LOWpydantic_ai_slim/pydantic_ai/ui/vercel_ai/_adapter.py876
LOWpydantic_ai_slim/pydantic_ai/ui/vercel_ai/_adapter.py919
LOWpydantic_ai_slim/pydantic_ai/ui/vercel_ai/_adapter.py258
LOWpydantic_ai_slim/pydantic_ai/ui/vercel_ai/_adapter.py514
218 more matches not shown…
Fake / Example Data116 hits · 136 pts
SeverityFileLineSnippet
LOWpydantic_ai_slim/pydantic_ai/output.py361 #> {'name': 'John Doe', 'age': 30}
LOWtests/test_agent.py240 {'name': 'John Doe'},
LOWtests/test_agent.py253 Person(name='John Doe'),
LOWtests/test_agent.py2251 args_json = '{"name": "John Doe", "age": 30}'
LOWtests/test_agent.py2261 assert result.output == snapshot({'name': 'John Doe', 'age': 30})
LOWtests/test_a2a.py61 args_json = '{"name": "John Doe", "age": 30, "email": "john@example.com"}'
LOWtests/test_a2a.py107 'result': {'name': 'John Doe', 'age': 30, 'email': 'john@example.com'}
LOWtests/test_examples.py578 args={'name': 'John Doe', 'age': 30},
LOWtests/test_examples.py882 tool_name='get_user_by_name', args={'name': 'John Doe'}, tool_call_id='pyd_ai_tool_call_id'
LOWtests/models/test_anthropic.py27792. The use of "John Doe" as a reference to a typical male in various contexts
LOWtests/models/test_anthropic.py27803. The use of variations like "Baby Doe" and numbered "John Doe"s in specific cases
LOWtests/models/test_anthropic.py2762 'This document appears to be a sample PDF file that mainly contains Lorem ipsum text, which is placeholder text
LOWtests/models/test_bedrock.py989An example text describing the use of "John Doe" as a placeholder name in legal cases, hospitals, and other contexts whe
LOWtests/models/test_bedrock.py989An example text describing the use of "John Doe" as a placeholder name in legal cases, hospitals, and other contexts whe
LOWtests/models/test_google.py832 'The main content of the TXT file is an explanation of the placeholder name "John Doe" (and related variations)
LOWtests/models/test_openai_responses.py662 'The main content of this document is an example of a TXT file type, with an explanation of the use of placehold
LOWtests/models/test_openai_responses.py662 'The main content of this document is an example of a TXT file type, with an explanation of the use of placehold
LOW…_google/test_google_model_text_document_url_input.yaml25 The names "John Doe" for males, "Jane Doe" or "Jane Roe" for females, or "Jonnie Doe" and "Janie Doe" for childr
LOW…_google/test_google_model_text_document_url_input.yaml25 The names "John Doe" for males, "Jane Doe" or "Jane Roe" for females, or "Jonnie Doe" and "Janie Doe" for childr
LOW…_google/test_google_model_text_document_url_input.yaml29 Similarly, a child or baby whose identity is unknown may be referred to as Baby Doe. A notorious murder case in
LOW…_google/test_google_model_text_document_url_input.yaml115 The main content of the TXT file is an explanation of the placeholder name "John Doe" (and related variati
LOW…/cassettes/test_anthropic/test_document_url_input.yaml45 - text: This document appears to be a sample PDF file that mainly contains Lorem ipsum text, which is placeholder
LOW…/cassettes/test_anthropic/test_document_url_input.yaml47 "This is a simple PDF file. Fun fun fun." The rest of the content consists of several paragraphs of Lorem ipsu
LOW…ettes/test_anthropic/test_text_document_url_input.yaml25 The names "John Doe" for males, "Jane Doe" or "Jane Roe" for females, or "Jonnie Doe" and "Janie Doe" for childr
LOW…ettes/test_anthropic/test_text_document_url_input.yaml25 The names "John Doe" for males, "Jane Doe" or "Jane Roe" for females, or "Jonnie Doe" and "Janie Doe" for childr
LOW…ettes/test_anthropic/test_text_document_url_input.yaml29 Similarly, a child or baby whose identity is unknown may be referred to as Baby Doe. A notorious murder case in
LOW…ettes/test_anthropic/test_text_document_url_input.yaml92 The names "John Doe" for males, "Jane Doe" or "Jane Roe" for females, or "Jonnie Doe" and "Janie Doe" for
LOW…ettes/test_anthropic/test_text_document_url_input.yaml92 The names "John Doe" for males, "Jane Doe" or "Jane Roe" for females, or "Jonnie Doe" and "Janie Doe" for
LOW…ettes/test_anthropic/test_text_document_url_input.yaml96 Similarly, a child or baby whose identity is unknown may be referred to as Baby Doe. A notorious murder ca
LOW…ettes/test_anthropic/test_text_document_url_input.yaml131 2. The use of "John Doe" as a reference to a typical male in various contexts
LOW…ettes/test_anthropic/test_text_document_url_input.yaml132 3. The use of variations like "Baby Doe" and numbered "John Doe"s in specific cases
LOW…direct-url_force_download-document-google_vertex].yaml701 The content of the document consists of several paragraphs of **Lorem Ipsum** placeholder text. The layout
LOW…_matrix[tool_return_content-url-document-mistral].yaml164 3. **Placeholder Text**: The majority of the document consists of **Lorem Ipsum** text, which is commonly us
LOW…_matrix[tool_return_content-url-document-mistral].yaml343 - The rest of the document consists of **Lorem Ipsum** text, which is commonly used as placeholder text i
LOW…ix[tool_return_content-url-document-bedrock_nova].yaml461 of **multiple paragraphs** filled with **Lorem Ipsum placeholder text**. Lorem Ipsum is commonly used as d
LOW…ix[tool_return_content-url-document-bedrock_nova].yaml463 appears to be **standard Lorem Ipsum**, which is typically a scrambled version of sections from \"De Finib
LOW…ix[tool_return_content-url-document-bedrock_nova].yaml475 PDF\"**. It contains **Lorem Ipsum placeholder text** organized into multiple paragraphs. The document is
LOW…ool_return_content-url-document-openai_responses].yaml226 I retrieved a PDF file (labelled in the text as "Sample PDF"). Its extracted text contains a short header li
LOW…ect-url_force_download-document-openai_responses].yaml600 - Content: about a dozen paragraphs of placeholder-style text (a mix of typical "Lorem ipsum" filler and Eng
LOW…ix[direct-url_force_download-document-google_2_5].yaml521 simple PDF file. Fun fun fun." The content of the document is placeholder "Lorem Ipsum" text, divided into
LOW…x[tool_return_content-url-document-google_vertex].yaml341 * **Body Text:** The document contains four paragraphs of "Lorem ipsum" text, which is standard Latin pl
LOW…ool_return_matrix[direct-url-document-google_2_5].yaml521 document contains several paragraphs of "Lorem ipsum" placeholder text.
LOW…_matrix[tool_return_content-url-document-xai].xai.yaml121 followed by several paragraphs of standard Lorem Ipsum placeholder text
LOW…atrix[tool_return_content-url-document-anthropic].yaml157 The PDF contains several paragraphs of **Lorem Ipsum** placeholder text - the classic dummy text commonly used
LOW…atrix[tool_return_content-url-document-anthropic].yaml159 The document appears to be a simple test or sample PDF, likely used for demonstration purposes, testing PDF re
LOW…tool_return_matrix[direct-url-document-anthropic].yaml154 **Content:** The document is a single-page sample PDF that contains Lorem Ipsum placeholder text - the classic
LOW…tool_return_matrix[direct-url-document-anthropic].yaml154 **Content:** The document is a single-page sample PDF that contains Lorem Ipsum placeholder text - the classic
LOW…tool_return_matrix[direct-url-document-anthropic].yaml156 **Purpose:** This appears to be a test or sample PDF document, likely used for demonstration purposes, testing
LOW…rix[tool_return_content-url-document-openai_chat].yaml552 - Title/first lines (from page 1): "Sample PDF" followed by "This is a simple PDF file. Fun fun fun." and th
LOW…rix[tool_return_content-url-document-openai_chat].yaml553 - Content summary: the page is a sample/placeholder document made up of multiple paragraphs of lorem ipsum a
LOW…rn_content-url_force_download-document-anthropic].yaml528 This is a simple sample PDF document with the subtitle "This is a simple PDF file. Fun fun fun." The document
LOW…rn_content-url_force_download-document-anthropic].yaml532 - The main body consists of multiple paragraphs of Latin placeholder text (Lorem Ipsum)
LOW…rn_content-url_force_download-document-anthropic].yaml533 - The text discusses various topics in the traditional Lorem Ipsum style, mentioning things like "dolor sit am
LOW…rn_content-url_force_download-document-anthropic].yaml533 - The text discusses various topics in the traditional Lorem Ipsum style, mentioning things like "dolor sit am
LOW…irect-url_force_download-document-google_gemini3].yaml652 of **\"Lorem ipsum\"** placeholder text, commonly used in publishing and graphic design to demonstrate the
LOW…irect-url_force_download-document-google_gemini3].yaml655 *\"Lorem ipsum dolor sit amet...\"*\n* **Format:** A standard text document layout with clean margins an
LOW…irect-url_force_download-document-google_gemini3].yaml655 *\"Lorem ipsum dolor sit amet...\"*\n* **Format:** A standard text document layout with clean margins an
LOW…ent-url_force_download-document-openai_responses].yaml599 I retrieved a PDF file titled "Sample PDF." It contains only plain text (no images or special formatting) --
LOW…return_matrix[direct-url-document-google_gemini3].yaml662 * **Body Text:** The document contains four paragraphs of "Lorem Ipsum" placeholder text. This is standa
LOW…l_tool_return_matrix[direct-url-document-xai].xai.yaml159 \ PDF file. Fun fun fun.\" followed by extensive Lorem ipsum dummy text\
56 more matches not shown…
Over-Commented Block110 hits · 108 pts
SeverityFileLineSnippet
LOWpyproject.toml281 # uvicorn (mcp server)
LOWpyproject.toml301 # happens only for python < 3.12 because of vllms pins
LOWpydantic_ai_slim/pyproject.toml121# FastMCP — full server-side stack. Pull this in when you need `FastMCP(...)` to serve an
LOWpydantic_ai_slim/pydantic_ai/tool_manager.py621
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py921 # Hand off to the model class for any history shapes the active provider can't
LOW…antic_ai_slim/pydantic_ai/capabilities/_tool_search.py161 # the request must error rather than silently substitute a different algorithm.
LOWpydantic_ai_slim/pydantic_ai/providers/bedrock.py41# JSON Schema keys that Bedrock structured output rejects with a 400 under `strict=True`.
LOWpydantic_ai_slim/pydantic_ai/models/google.py1321
LOWpydantic_ai_slim/pydantic_ai/models/groq.py781 code: Literal['tool_use_failed']
LOWpydantic_ai_slim/pydantic_ai/models/openai.py3601 )
LOWpydantic_ai_slim/pydantic_ai/toolsets/_tool_search.py261 # `_resolve_native_tool_swap`).
LOWtests/test_tool_search.py4121 _normalize_tool_search_args(None)
LOWdocs/evals/evaluators/report-evaluators.md741 #> confusion_matrix: Animal Classification
LOWdocs/models/outlines.md221print(result.output)
LOWpydantic_evals/pydantic_evals/_online.py281# The original signature was
LOWscripts/gather-pydantic-ai-review-context.sh1#!/usr/bin/env bash
LOW.github/zizmor.yml41 # org-internal repo under the same maintenance group. SHA-pinning the cross-repo reference
LOW.github/workflows/pydantic-ai-pr-review.lock.yml1# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"18d18811c742c3bc1c672f4b8929061a0ec4ee670c1889f253c9152beb5
LOW.github/workflows/pydantic-ai-pr-review.lock.yml21# Not all edits will cause changes to this file.
LOW.github/workflows/pydantic-ai-pr-review.lock.yml41# - GH_AW_GITHUB_MCP_SERVER_TOKEN
LOW.github/workflows/pydantic-ai-pr-review.lock.yml61# - ghcr.io/github/gh-aw-firewall/agent:0.25.49
LOW.github/workflows/pydantic-ai-pr-review.lock.yml821 bash "${RUNNER_TEMP}/gh-aw/actions/start_cli_proxy.sh"
LOW.github/workflows/pydantic-ai-pr-review.lock.yml841 # - TodoWrite
LOW.github/workflows/pydantic-ai-pr-review.lock.yml861 # - mcp__github__get_pull_request_reviews
LOW.github/workflows/pydantic-ai-pr-review.lock.yml881 # - mcp__github__list_releases
LOW.github/workflows/pydantic-ai-pr-review.lock.yml1361 continue-on-error: true
LOW…kflows/pydantic-ai-streaming-resilience-sweep.lock.yml1# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"3c32da83b559aee23abaf3d3ccbec6cfe1f782564c822f327859628e570
LOW…kflows/pydantic-ai-streaming-resilience-sweep.lock.yml21# Not all edits will cause changes to this file.
LOW…kflows/pydantic-ai-streaming-resilience-sweep.lock.yml41# - GH_AW_GITHUB_TOKEN
LOW…kflows/pydantic-ai-streaming-resilience-sweep.lock.yml761 # - Bash
LOW…kflows/pydantic-ai-streaming-resilience-sweep.lock.yml781 # - mcp__github__get_code_scanning_alert
LOW…kflows/pydantic-ai-streaming-resilience-sweep.lock.yml801 # - mcp__github__get_tag
LOW…kflows/pydantic-ai-streaming-resilience-sweep.lock.yml821 # - mcp__github__list_workflow_jobs
LOW…kflows/pydantic-ai-streaming-resilience-sweep.lock.yml1301 # - BashOutput
LOW…/workflows/pydantic-ai-provider-mapping-sweep.lock.yml1# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"ed19369d11818d7c004f0562b1398f2f5b0aac08a604f7c309197ebf4dc
LOW…/workflows/pydantic-ai-provider-mapping-sweep.lock.yml21# Not all edits will cause changes to this file.
LOW…/workflows/pydantic-ai-provider-mapping-sweep.lock.yml41# - GH_AW_GITHUB_TOKEN
LOW…/workflows/pydantic-ai-provider-mapping-sweep.lock.yml761 # - Bash
LOW…/workflows/pydantic-ai-provider-mapping-sweep.lock.yml781 # - mcp__github__get_code_scanning_alert
LOW…/workflows/pydantic-ai-provider-mapping-sweep.lock.yml801 # - mcp__github__get_tag
LOW…/workflows/pydantic-ai-provider-mapping-sweep.lock.yml821 # - mcp__github__list_workflow_jobs
LOW…/workflows/pydantic-ai-provider-mapping-sweep.lock.yml1301 # - BashOutput
LOW.github/workflows/pydantic-ai-docs-drift.lock.yml1# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"8e0720db9ff8fada79a26bf880647b3f5321130e51da296b80d97c951c2
LOW.github/workflows/pydantic-ai-docs-drift.lock.yml21# Not all edits will cause changes to this file.
LOW.github/workflows/pydantic-ai-docs-drift.lock.yml41# - GH_AW_GITHUB_TOKEN
LOW.github/workflows/pydantic-ai-docs-drift.lock.yml761 # - Bash
LOW.github/workflows/pydantic-ai-docs-drift.lock.yml781 # - mcp__github__get_code_scanning_alert
LOW.github/workflows/pydantic-ai-docs-drift.lock.yml801 # - mcp__github__get_tag
LOW.github/workflows/pydantic-ai-docs-drift.lock.yml821 # - mcp__github__list_workflow_jobs
LOW.github/workflows/pydantic-ai-docs-drift.lock.yml1301 # - BashOutput
LOW.github/workflows/pydantic-ai-bug-hunter.lock.yml1# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"6a21aac9714bc66c7e94d3cca6f5e9966efd1c9701f9ba4a3147f6a9858
LOW.github/workflows/pydantic-ai-bug-hunter.lock.yml21# Not all edits will cause changes to this file.
LOW.github/workflows/pydantic-ai-bug-hunter.lock.yml41# - GH_AW_GITHUB_TOKEN
LOW.github/workflows/pydantic-ai-bug-hunter.lock.yml761 # - Bash
LOW.github/workflows/pydantic-ai-bug-hunter.lock.yml781 # - mcp__github__get_code_scanning_alert
LOW.github/workflows/pydantic-ai-bug-hunter.lock.yml801 # - mcp__github__get_tag
LOW.github/workflows/pydantic-ai-bug-hunter.lock.yml821 # - mcp__github__list_workflow_jobs
LOW.github/workflows/pydantic-ai-bug-hunter.lock.yml1301 # - BashOutput
LOW.github/workflows/harness-compat.yml1name: Harness Compat
LOW…hub/workflows/pydantic-ai-regression-detector.lock.yml1# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"2e6cd4b68a8809cb540df8fd69b6770506ed194330dbb97b1fb3b444b86
50 more matches not shown…
Excessive Try-Catch Wrapping84 hits · 87 pts
SeverityFileLineSnippet
LOWpydantic_ai_slim/pydantic_ai/_output.py212 except Exception as e:
LOWpydantic_ai_slim/pydantic_ai/retries.py192 except Exception:
LOWpydantic_ai_slim/pydantic_ai/retries.py289 except Exception:
LOWpydantic_ai_slim/pydantic_ai/run.py297 except Exception as e:
LOWpydantic_ai_slim/pydantic_ai/tool_manager.py334 except Exception as e:
LOWpydantic_ai_slim/pydantic_ai/_instrumentation.py86 except Exception:
LOWpydantic_ai_slim/pydantic_ai/_instrumentation.py89 except Exception as e:
LOWpydantic_ai_slim/pydantic_ai/_instrumentation.py102 except Exception: # pragma: no cover
LOWpydantic_ai_slim/pydantic_ai/_instrumentation.py264 except Exception as e:
LOWpydantic_ai_slim/pydantic_ai/_spec.py248 except Exception as e:
LOWpydantic_ai_slim/pydantic_ai/_template.py141 except Exception:
LOWpydantic_ai_slim/pydantic_ai/_a2a.py173 except Exception:
LOWpydantic_ai_slim/pydantic_ai/direct.py391 except Exception as e:
MEDIUMpydantic_ai_slim/pydantic_ai/direct.py383def _consume_async_stream():
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py153 except Exception:
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py695 except Exception as e:
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py738 except Exception as e:
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py820 except Exception as e:
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py2035 except Exception:
LOWpydantic_ai_slim/pydantic_ai/usage.py176 except Exception:
LOWpydantic_ai_slim/pydantic_ai/ui/_event_stream.py231 except Exception as exc: # `exc` to avoid shadowing by `async for e in` below
LOWpydantic_ai_slim/pydantic_ai/ui/ag_ui/_utils.py74 except Exception:
LOWpydantic_ai_slim/pydantic_ai/embeddings/instrumented.py149 except Exception as e: # pragma: no cover
LOWpydantic_ai_slim/pydantic_ai/embeddings/instrumented.py191 except Exception: # pragma: no cover
LOWpydantic_ai_slim/pydantic_ai/embeddings/instrumented.py205 except Exception: # pragma: no cover
LOWpydantic_ai_slim/pydantic_ai/embeddings/instrumented.py208 except Exception as e:
LOWpydantic_ai_slim/pydantic_ai/capabilities/hooks.py931 except Exception as new_error:
LOWpydantic_ai_slim/pydantic_ai/capabilities/hooks.py991 except Exception as new_error:
LOWpydantic_ai_slim/pydantic_ai/capabilities/hooks.py1113 except Exception as new_error:
LOWpydantic_ai_slim/pydantic_ai/capabilities/hooks.py1232 except Exception as new_error:
LOWpydantic_ai_slim/pydantic_ai/capabilities/combined.py254 except Exception as new_error:
LOWpydantic_ai_slim/pydantic_ai/capabilities/combined.py315 except Exception as new_error:
LOWpydantic_ai_slim/pydantic_ai/capabilities/combined.py434 except Exception as new_error:
LOWpydantic_ai_slim/pydantic_ai/capabilities/combined.py490 except Exception: # pragma: no cover — defensive
LOWpydantic_ai_slim/pydantic_ai/capabilities/combined.py544 except Exception as new_error:
LOWpydantic_ai_slim/pydantic_ai/models/fallback.py232 except Exception as exc:
LOWpydantic_ai_slim/pydantic_ai/models/fallback.py266 except Exception as exc:
LOWpydantic_ai_slim/pydantic_ai/_cli/web.py89 except Exception as e: # pragma: no cover
MEDIUMpydantic_ai_slim/pydantic_ai/_cli/__init__.py298 console.print(f'Error initializing [magenta]{args.model}[/magenta]:\n[red]{e}[/red]')
LOWpydantic_ai_slim/pydantic_ai/_cli/__init__.py375 except Exception as e: # pragma: no cover
LOWtests/conftest.py754 except Exception: # pragma: no cover
LOWtests/test_agent.py5972 except Exception as e:
LOWtests/test_capabilities.py3472 except Exception as e:
LOWtests/_inline_snapshot.py119 except Exception as e:
MEDIUMdocs/agent.md1227 print('An error occurred:', e)
LOWdocs/toolsets.md616 except Exception as e:
LOWdocs/evals/evaluators/overview.md95 except Exception:
LOWdocs/evals/evaluators/custom.md119 except Exception:
LOWdocs/evals/evaluators/custom.md291 except Exception as e:
LOWdocs/evals/evaluators/custom.md521 except Exception as e:
LOWdocs/evals/evaluators/custom.md616 except Exception:
LOWpydantic_evals/pydantic_evals/online.py687 except Exception: # pragma: no cover - defensive
LOWpydantic_evals/pydantic_evals/online.py689 except Exception as e:
LOWpydantic_evals/pydantic_evals/online.py761 except Exception: # pragma: no cover - defensive
LOWpydantic_evals/pydantic_evals/online.py763 except Exception as e:
LOWpydantic_evals/pydantic_evals/online.py815 except Exception: # pragma: no cover
LOWpydantic_evals/pydantic_evals/dataset.py1086 except Exception as e:
LOWpydantic_evals/pydantic_evals/dataset.py1243 except Exception as exc:
LOWpydantic_evals/pydantic_evals/_online.py184 except Exception: # pragma: no cover
LOWpydantic_evals/pydantic_evals/_online.py248 except Exception as exc:
24 more matches not shown…
Dead Code41 hits · 75 pts
SeverityFileLineSnippet
MEDIUMpydantic_ai_slim/pydantic_ai/mcp.py864
MEDIUMpydantic_ai_slim/pydantic_ai/_agent_graph.py569
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py454
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py463
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py472
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py480
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py488
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py496
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py504
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py514
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py523
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py533
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py543
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py552
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py564
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py573
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py582
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py591
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py600
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py609
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py618
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py627
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py636
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py645
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py654
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py663
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py672
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py681
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py690
MEDIUM…ntic_ai_slim/pydantic_ai/ui/vercel_ai/_event_stream.py169
MEDIUM…ntic_ai_slim/pydantic_ai/ui/vercel_ai/_event_stream.py281
MEDIUMpydantic_ai_slim/pydantic_ai/ui/ag_ui/_event_stream.py118
MEDIUMpydantic_ai_slim/pydantic_ai/agent/abstract.py1484
MEDIUMpydantic_ai_slim/pydantic_ai/agent/abstract.py1524
MEDIUMpydantic_ai_slim/pydantic_ai/models/wrapper.py36
MEDIUMpydantic_ai_slim/pydantic_ai/models/__init__.py780
MEDIUMpydantic_ai_slim/pydantic_ai/models/__init__.py1329
MEDIUMpydantic_ai_slim/pydantic_ai/models/mcp_sampling.py86
MEDIUMtests/test_ag_ui.py339
MEDIUMtests/models/test_fallback.py508
MEDIUMpydantic_graph/pydantic_graph/step.py112
AI Slop Vocabulary28 hits · 62 pts
SeverityFileLineSnippet
LOWpydantic_ai_slim/pydantic_ai/_output.py352 # Text output: no real validation, just pass through the text
LOWpydantic_ai_slim/pydantic_ai/_json_schema.py195 # they are both null, so just return one of them
LOWpydantic_ai_slim/pydantic_ai/_utils.py454 # If we already have a buffered item, just return it.
MEDIUM…_slim/pydantic_ai/capabilities/process_event_stream.py70 # the observer form returns an awaitable. Introspecting the return is robust for
LOWpydantic_ai_slim/pydantic_ai/models/mistral.py747 # It seems that mistral just sends full tool calls, so we just use them directly, rather than buildi
LOW…ntic_ai_slim/pydantic_ai/durable_exec/temporal/_mcp.py61 # so we just return the ToolDefinitions and wrap them in ToolsetTool outside of the activity.
LOWpydantic_ai_slim/pydantic_ai/durable_exec/dbos/_mcp.py47 # so we just return the ToolDefinitions and wrap them in ToolsetTool outside of the activity.
LOW…dantic_ai_slim/pydantic_ai/durable_exec/dbos/_model.py94 # If not in a workflow (could be in a step), just call the wrapped request_stream method.
LOW…tic_ai_slim/pydantic_ai/durable_exec/prefect/_model.py100 # If not in a flow, just call the wrapped request_stream method
LOWtests/test_dbos.py253 # DBOSAgent already wraps the `run` function as a DBOS workflow, so we can just call it directly.
LOWtests/test_dbos.py673 # DBOSAgent already wraps the `run` function as a DBOS workflow, so we can just call it directly.
MEDIUMtests/cassettes/test_dbos/test_fastmcp_toolset.yaml595 data: {"jsonrpc":"2.0","id":1,"result":{"content":[{"type":"text","text":"This repository, `pydantic/pydantic-ai
MEDIUM…est_temporal/test_mcp_dynamic_toolset_in_workflow.yaml663 data: {"jsonrpc":"2.0","id":2,"result":{"content":[{"type":"text","text":"The `pydantic-ai` repository is a Pyth
MEDIUMtests/cassettes/test_temporal/test_fastmcp_toolset.yaml598 data: {"jsonrpc":"2.0","id":1,"result":{"content":[{"type":"text","text":"This repository, `pydantic/pydantic-ai
MEDIUMtests/cassettes/test_temporal/test_fastmcp_toolset.yaml598 data: {"jsonrpc":"2.0","id":1,"result":{"content":[{"type":"text","text":"This repository, `pydantic/pydantic-ai
MEDIUM…/test_anthropic/test_anthropic_mcp_servers_stream.yaml129 data: {"type":"content_block_start","index":2,"content_block":{"type":"mcp_tool_result","tool_use_id":"mcptoolu_
MEDIUM…est_openai_responses_model_mcp_server_tool_stream.yaml79 data: {"type":"response.output_item.done","sequence_number":13,"output_index":2,"item":{"id":"mcp_00b9cc7a23d047
MEDIUM…est_openai_responses_model_mcp_server_tool_stream.yaml619 data: {"type":"response.completed","sequence_number":193,"response":{"id":"resp_00b9cc7a23d047270068faa0e2593481
MEDIUM…est_openai_responses_model_mcp_server_tool_stream.yaml619 data: {"type":"response.completed","sequence_number":193,"response":{"id":"resp_00b9cc7a23d047270068faa0e2593481
LOW…antic_evals/pydantic_evals/reporting/render_numbers.py30 # If it's an int, just return its string representation.
MEDIUM.github/zizmor.yml40 # `harness-compat.yml` calls a reusable workflow in `pydantic/pydantic-ai-harness`, an
MEDIUM.github/zizmor.yml42 # would force coordinated bumps on every harness change without meaningful security benefit
MEDIUM.github/workflows/harness-compat.yml3# Verifies that pydantic-ai changes don't break the pydantic-ai-harness lint /
MEDIUM.github/workflows/harness-compat.yml4# typecheck / test suite. Calls the harness's `compat-test.yml` reusable
MEDIUM.github/workflows/harness-compat.yml11# - Push of `v*` tags: gates a release on harness compatibility.
MEDIUM.github/workflows/harness-compat.yml35 # on every harness change without security benefit. Ignore configured in `.github/zizmor.yml`.
MEDIUM.github/scripts/prewarm-pydantic-ai-runner.sh2# Pre-warm the harness's uv script environment on the OPEN network.
LOWpydantic_graph/pydantic_graph/parent_forks.py130 # will fail to be a parent fork for the same reason. So we can stop here and just return `parent_fork`.
Redundant / Tautological Comments38 hits · 58 pts
SeverityFileLineSnippet
LOWpydantic_ai_slim/pydantic_ai/tool_manager.py162 # Check if any tool requires sequential execution
LOWpydantic_ai_slim/pydantic_ai/_ssrf.py349 # Check if hostname is already an IP address
LOWpydantic_ai_slim/pydantic_ai/_ssrf.py394 # Check if it's an absolute URL (has scheme) or protocol-relative URL (has netloc but no scheme)
LOWpydantic_ai_slim/pydantic_ai/_ssrf.py509 # Check if we need to follow a redirect
LOWpydantic_ai_slim/pydantic_ai/function_signature.py652 # Check if this is object with properties + null
LOWpydantic_ai_slim/pydantic_ai/mcp.py2944 # Check if variable exists in environment
LOWpydantic_ai_slim/pydantic_ai/providers/litellm.py71 # Check if model name contains a provider prefix (e.g., "anthropic/claude-3")
LOWpydantic_ai_slim/pydantic_ai/models/__init__.py861 # Check if output mode is supported
LOWpydantic_ai_slim/pydantic_ai/models/openai.py1366 # Check if thinking came from a custom field from the same provider
LOW…ic_ai_slim/pydantic_ai/durable_exec/temporal/_model.py228 # Check if this model instance is already registered
LOW…/pydantic_ai/durable_exec/prefect/_function_toolset.py47 # Check if this specific tool has custom config or is disabled
LOW…tic_ai_slim/pydantic_ai/durable_exec/prefect/_model.py97 # Check if we're in a flow context
LOWpydantic_ai_slim/pydantic_ai/_cli/__init__.py149 # Check if this is a web command - route to web parser if so
LOWpydantic_ai_slim/pydantic_ai/profiles/openai.py220 # Check if the model supports web search (only specific search-preview models)
LOWtests/test_capabilities.py2814 # Check if there's already a tool return in messages (i.e., tool was called)
LOWtests/test_capabilities.py9690 # Check if we already got a tool return (second call succeeded)
LOWtests/test_uuid.py48 # Set counter to max so the next same-ms call overflows
LOWtests/evals/test_evaluators.py228 # Check if the answer is correct based on expected output
LOWtests/evals/test_llm_as_a_judge.py118 # Check if 'model' kwarg is passed, its value will be the default model or None
LOWtests/evals/test_llm_as_a_judge.py239 # Check if 'model' kwarg is passed, its value will be the default model or None
LOWtests/evals/test_llm_as_a_judge.py349 # Check if 'model' kwarg is passed, its value will be the default model or None
LOWtests/evals/test_llm_as_a_judge.py385 # Check if 'model' kwarg is passed, its value will be the default model or None
LOWtests/evals/test_llm_as_a_judge.py507 # Check if 'model' kwarg is passed, its value will be the default model or None
LOWtests/evals/test_llm_as_a_judge.py538 # Check if 'model' kwarg is passed, its value will be the default model or None
LOWtests/graph/beta/test_graph_iteration.py455 # Check if we're about to execute step2
LOWtests/models/test_openai.py5081 # Set profile to use URI encoding
LOWtests/models/test_openai.py5137 # Set profile to use URI encoding
LOWdocs/.hooks/main.py166 # Check if code contains Agent() with a model that should be transformed
LOWdocs/.hooks/main.py177 # Check if model starts with one of the gateway-supported models
LOWpydantic_evals/pydantic_evals/evaluators/evaluator.py99 # Check if value matches any of the target types, handling bool as a special case
LOW.github/workflows/pr-guard.yml121 # Check if the existing PR has the Stale label
LOWpydantic_graph/pydantic_graph/graph_builder.py755 # Check if this join has any intermediate joins that are also active reducers
LOWpydantic_graph/pydantic_graph/graph_builder.py763 # Check if the intermediate join is also an active reducer with matching fork run
LOWpydantic_graph/pydantic_graph/graph_builder.py766 # Check if they share the same fork run for this join's parent fork
LOWpydantic_graph/pydantic_graph/graph_builder.py242 # Check if this join appears in any other join's intermediate_join_nodes
LOWpydantic_graph/pydantic_graph/graph_builder.py1038 # Check if any of the tasks in the graph have this fork_run_id in their fork_stack
LOWpydantic_graph/pydantic_graph/graph_builder.py1771 # Check if this node has any outgoing edges
LOWpydantic_graph/pydantic_graph/graph_builder.py2006 # Check if this intermediate node is also a join
Slop Phrases15 hits · 33 pts
SeverityFileLineSnippet
MEDIUMtests/typed_deps.py41# Ensure that you can use tools with deps that are supertypes of the agent's deps
MEDIUM…test_tool_search/test_tool_search_eval[anthropic].yaml1462 I apologize, but I don't have access to a flight booking tool. I'm unable to book flights from New York to Lon
MEDIUMtests/models/test_groq.py877It's worth noting that the weather in San Francisco can be quite variable, and the temperature can drop significantly at
MEDIUMtests/models/test_groq.py1120It's worth noting that the weather in San Francisco can be quite variable, and the temperature can drop significantly at
MEDIUM…_matrix[tool_return_content-url-document-xai].xai.yaml125 The content appears to be purely for demonstration purposes and lacks
MEDIUM…atrix[tool_return_content-url-document-anthropic].yaml159 The document appears to be a simple test or sample PDF, likely used for demonstration purposes, testing PDF re
MEDIUM…tool_return_matrix[direct-url-document-anthropic].yaml156 **Purpose:** This appears to be a test or sample PDF document, likely used for demonstration purposes, testing
MEDIUM…tool_return_matrix[direct-binary-audio-anthropic].yaml144 - text: "I received an audio file (file 2d36ae) in MP3 format (audio/mpeg). However, I'm unable to process or list
MEDIUM…rn_content-url_force_download-document-anthropic].yaml536 This appears to be a test or sample PDF file, likely used for demonstration purposes, testing PDF readers, or
MEDIUM…rix[direct-url_force_download-document-anthropic].yaml534 **Purpose:** This appears to be a sample or test PDF file, likely used for demonstration purposes given its si
MEDIUM…turn_content-url_force_download-document-mistral].yaml539 This PDF appears to be a template or test file, likely used for demonstration purposes.
MEDIUM…tool_return_matrix[direct-binary-video-anthropic].yaml145 I received a video file (file 0d0cb1) in MP4 format. However, I'm unable to view or analyze video content dire
MEDIUM…ssettes/test_groq/test_groq_model_web_search_tool.yaml52 it is not expected to significantly impact San Francisco.\n\nIt's worth noting that the weather in San Franc
LOW…s/test_deepseek/test_deepseek_model_thinking_part.yaml67 Oh, and making eye contact with drivers if possible. That's a good point. Also, stay visible, maybe avoid di
MEDIUMpydantic_graph/pydantic_graph/mermaid.py254 code by default (and should not have a leading '#'), but you can also use named colors by prefixing the
Synthetic Comment Markers2 hits · 15 pts
SeverityFileLineSnippet
HIGHpydantic_graph/pydantic_graph/graph.py245 # as requested in https://github.com/pydantic/pydantic-ai/issues/3173.
HIGHpydantic_graph/pydantic_graph/graph.py734 # as requested in https://github.com/pydantic/pydantic-ai/issues/3173.
Overly Generic Function Names12 hits · 11 pts
SeverityFileLineSnippet
LOWpydantic_ai_slim/pydantic_ai/retries.py168 def handle_request(self, request: Request) -> Response:
LOWpydantic_ai_slim/pydantic_ai/retries.py183 def handle_request(req: Request) -> Response:
LOWpydantic_ai_slim/pydantic_ai/_a2a.py134 async def run_task(self, params: TaskSendParams) -> None:
LOWtests/test_ui.py1576 def do_something(x: int) -> int:
LOWtests/typed_agent.py268 def my_method(self) -> bool:
LOWtests/test_tools.py4126 def do_stuff(x: int) -> None:
LOWtests/test_tools.py4136 def do_stuff(x: int):
LOWtests/graph/beta/test_util.py35 def my_function():
LOWtests/models/test_xai.py744 async def process_data(data: str) -> str:
LOWpydantic_evals/pydantic_evals/online.py22async def my_function(x: int) -> int:
LOWpydantic_evals/pydantic_evals/online.py883 async def my_function(x: int) -> int:
LOWpydantic_evals/pydantic_evals/_task_run.py36def run_task() -> Iterator[Callable[[], dict[str, Any]]]:
Verbosity Indicators5 hits · 10 pts
SeverityFileLineSnippet
LOWtests/test_toolsets.py441 # Step 1: Prefix each FunctionToolset individually
LOWtests/test_toolsets.py446 # Step 2: Combine the prefixed toolsets
LOWtests/test_toolsets.py449 # Step 3: Filter tools based on user role and advanced flag, now using prefixed names
LOWtests/test_toolsets.py461 # Step 4: Apply prepared toolset to modify descriptions (add user role annotation)
LOWtests/test_toolsets.py469 # Step 5: Test the fully composed toolset