Repository Analysis

pydantic/pydantic-ai

How Python does AI. Agents, realtime voice, image generation, embeddings. Every model, every interface, typed end to end.

11.0 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of pydantic/pydantic-ai, a Python project with 19,565 GitHub stars. SynthScan v2.0 examined 1,066,221 lines of code across 2484 source files, recording 11062 pattern matches distributed across 23 syntactic categories. The overall adjusted score of 11.0 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

11.0
Adjusted Score
11.0
Raw Score
100%
Time Factor
2026-08-28
Last Push
19.6K
Stars
Python
Language
1.1M
Lines of Code
2.5K
Files
11.1K
Pattern Hits
2026-08-29
Scan Date
0.21
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 530MEDIUM 524LOW 10008

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 11062 distinct pattern matches across 23 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers7925 hits · 5648 pts
SeverityFileLineSnippetContext
LOWpydantic_ai_slim/pydantic_ai/_output.py107def _isinstance_maybe_generic(value: Any, type_: type[Any]) -> bool:CODE
LOWpydantic_ai_slim/pydantic_ai/_output.py126async def run_output_validate_hooks(CODE
LOWpydantic_ai_slim/pydantic_ai/_thinking_part.py6def split_content_into_text_and_thinking(content: str, thinking_tags: tuple[str, str]) -> list[ThinkingPart | TextPart]:CODE
LOWpydantic_ai_slim/pydantic_ai/tool_manager.py129def _validate_hook_deferral_error(hook_name: str, error: CallDeferred | ApprovalRequired) -> UserError:CODE
LOWpydantic_ai_slim/pydantic_ai/tool_manager.py231 def get_parallel_execution_mode(self) -> ParallelExecutionMode:CODE
LOWpydantic_ai_slim/pydantic_ai/tool_manager.py739 async def validate_output_tool_call(CODE
LOWpydantic_ai_slim/pydantic_ai/tool_manager.py1132 async def resolve_deferred_tool_calls(CODE
LOWpydantic_ai_slim/pydantic_ai/_instrumentation.py123def get_agent_run_baggage_attributes() -> dict[str, Any]:CODE
LOWpydantic_ai_slim/pydantic_ai/_instrumentation.py330def model_request_parameters_attributes(CODE
LOWpydantic_ai_slim/pydantic_ai/_instrumentation.py336def model_settings_attributes(model_settings: ModelSettings | None) -> dict[str, AttributeValue]:CODE
LOWpydantic_ai_slim/pydantic_ai/_instrumentation.py346def annotate_tool_call_otel_metadata(response: ModelResponse, parameters: ModelRequestParameters) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/_instrumentation.py423def response_price_calculation(response: ModelResponse) -> PriceCalculation | None:CODE
LOWpydantic_ai_slim/pydantic_ai/_instrumentation.py735 def get_output_tool_span_name(self, tool_name: str) -> str:CODE
LOWpydantic_ai_slim/pydantic_ai/_tool_search.py373def _narrow_native_tool_search_call(part: NativeToolCallPart) -> NativeToolSearchCallPart:CODE
LOWpydantic_ai_slim/pydantic_ai/_tool_search.py380def _narrow_native_tool_search_return(part: NativeToolReturnPart) -> NativeToolSearchReturnPart:CODE
LOWpydantic_ai_slim/pydantic_ai/_tool_search.py394def _narrow_tool_search_return(part: ToolReturnPart) -> ToolSearchReturnPart:CODE
LOWpydantic_ai_slim/pydantic_ai/_tool_search.py442def synthesize_local_from_native_call(part: NativeToolSearchCallPart) -> ToolSearchCallPart:CODE
LOWpydantic_ai_slim/pydantic_ai/_tool_search.py454def synthesize_local_from_native_return(part: NativeToolSearchReturnPart) -> ToolSearchReturnPart:CODE
LOWpydantic_ai_slim/pydantic_ai/_tool_search.py471def synthesize_local_tool_search_messages(CODE
LOWpydantic_ai_slim/pydantic_ai/_cost.py29def calculate_price_for_usage(CODE
LOWpydantic_ai_slim/pydantic_ai/_http.py81def warn_if_legacy_httpx_client(http_client: object, *, consumer: str, stacklevel: int) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/_mcp.py134def map_from_sampling_content(CODE
LOWpydantic_ai_slim/pydantic_ai/tools.py269 def _named_required_fields_schema(self, named_required_fields: Sequence[tuple[str, bool, Any]]) -> JsonSchemaValue:CODE
LOWpydantic_ai_slim/pydantic_ai/_deferred_capabilities.py113def _narrow_load_capability_call(part: ToolCallPart) -> LoadCapabilityCallPart:CODE
LOWpydantic_ai_slim/pydantic_ai/_deferred_capabilities.py120def _narrow_load_capability_return(part: ToolReturnPart) -> LoadCapabilityReturnPart:CODE
LOWpydantic_ai_slim/pydantic_ai/_deferred_capabilities.py138def parse_loaded_capabilities(messages: Sequence[ModelMessage]) -> set[str]:CODE
LOWpydantic_ai_slim/pydantic_ai/_deferred_capabilities.py159def registered_loaded_capability_ids(messages: Sequence[ModelMessage], capability_ids: Collection[str]) -> set[str]:CODE
LOWpydantic_ai_slim/pydantic_ai/_deferred_capabilities.py175def _parse_loaded_capabilities(messages: Sequence[ModelMessage]) -> set[str]:CODE
LOWpydantic_ai_slim/pydantic_ai/_ssrf.py136def _compatible_request_error_init(self: Exception, message: str, *, request: httpx2.Request | None = None) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/_ssrf.py141def _compatible_http_status_error_init(CODE
LOWpydantic_ai_slim/pydantic_ai/_ssrf.py173def _compatible_request_error(error: httpx2.RequestError) -> Exception:CODE
LOWpydantic_ai_slim/pydantic_ai/_ssrf.py724def _response_with_decoded_content(response: httpx2.Response, content: bytes) -> httpx2.Response:CODE
LOWpydantic_ai_slim/pydantic_ai/function_signature.py371 def get_conflicting_type_names(signatures: list[FunctionSignature]) -> frozenset[str]:CODE
LOWpydantic_ai_slim/pydantic_ai/function_signature.py407 def collect_unique_referenced_types(signatures: list[FunctionSignature]) -> list[TypeSignature]:CODE
LOWpydantic_ai_slim/pydantic_ai/function_signature.py538def _build_params_from_schema(CODE
LOWpydantic_ai_slim/pydantic_ai/_function_schema.py398def _extract_return_schema_type(return_annotation: Any, function: Callable[..., Any]) -> Any:CODE
LOWpydantic_ai_slim/pydantic_ai/_spec.py37def serializes_as_string_keyed_dict(value: Any) -> bool:CODE
LOWpydantic_ai_slim/pydantic_ai/_template.py57def _hint_contains_template_str(hint: Any) -> bool:CODE
LOWpydantic_ai_slim/pydantic_ai/result.py333 async def _stream_text_deltas_ungrouped() -> AsyncIterator[tuple[str, int]]:CODE
LOWpydantic_ai_slim/pydantic_ai/result.py1047def _get_usage_checking_stream_response(CODE
LOWpydantic_ai_slim/pydantic_ai/result.py1065def _get_deferred_tool_requests(CODE
LOWpydantic_ai_slim/pydantic_ai/_run_context.py568def _run_context_init_with_capability_loaded(CODE
LOWpydantic_ai_slim/pydantic_ai/mcp.py1159 def _invalidate_resources_cache(self) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/mcp.py1162 def _invalidate_prompts_cache(self) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/mcp.py1696def _make_httpx_client_factory(CODE
LOWpydantic_ai_slim/pydantic_ai/mcp.py1757def _map_mcp_call_tool_result(result: CallToolResult, *, prefer_structured: bool = False) -> Any:CODE
LOWpydantic_ai_slim/pydantic_ai/_tool_execution.py41def cancelled_sub_agent_return(CODE
LOWpydantic_ai_slim/pydantic_ai/_tool_execution.py170def _reject_unloaded_capability_reveals(CODE
LOWpydantic_ai_slim/pydantic_ai/_tool_execution.py204def _prune_duplicate_tool_reveals(CODE
LOWpydantic_ai_slim/pydantic_ai/_deferred.py124def _deferred_tool_call_result_discriminator(x: Any) -> str | None:CODE
LOWpydantic_ai_slim/pydantic_ai/messages.py161def _serialize_provider_details_delta(CODE
LOWpydantic_ai_slim/pydantic_ai/messages.py210def _multi_modal_content_identifier(identifier: str | bytes) -> str:CODE
LOWpydantic_ai_slim/pydantic_ai/messages.py1053def _infer_modality_from_media_type(media_type: str) -> Literal['image', 'audio', 'video'] | None:CODE
LOWpydantic_ai_slim/pydantic_ai/messages.py1064def _convert_binary_to_otel_part(CODE
LOWpydantic_ai_slim/pydantic_ai/messages.py1173def _tool_return_content_discriminator(value: Any) -> str:CODE
LOWpydantic_ai_slim/pydantic_ai/messages.py1206def _validate_multimodal_or_passthrough(value: Any, handler: pydantic.ValidatorFunctionWrapHandler) -> Any:CODE
LOWpydantic_ai_slim/pydantic_ai/messages.py1222def _serialize_multimodal_or_passthrough(value: Any, handler: pydantic.SerializerFunctionWrapHandler) -> Any:CODE
LOWpydantic_ai_slim/pydantic_ai/messages.py1517 def model_response_str_and_user_content(self, *, wrap_if_error: bool = True) -> tuple[str, list[UserContent]]:CODE
LOWpydantic_ai_slim/pydantic_ai/messages.py2444def _model_request_part_discriminator(v: Any) -> str | None:CODE
LOWpydantic_ai_slim/pydantic_ai/messages.py2485def _tool_results_first_sort_key(part: ModelRequestPart) -> int: # pyright: ignore[reportUnusedFunction]CODE
7865 more matches not shown…
Cross-Language Confusion289 hits · 1415 pts
SeverityFileLineSnippetContext
HIGHpydantic_ai_slim/pydantic_ai/_json_schema.py220 # they are both null, so just return one of themCOMMENT
HIGHpydantic_ai_slim/pydantic_ai/models/openrouter.py1233 # arrive mid-stream. `_OpenRouterChatCompletionChunk.choices` is required and non-null,COMMENT
HIGHpydantic_ai_slim/pydantic_ai/models/openai.py2371 # Some OpenAI-compatible gateways (e.g. Bifrost) return text=null;COMMENT
HIGHpydantic_ai_slim/pydantic_ai/realtime/openai.py970 # `turn_detection` is always set: a dict enables VAD, `None` (explicit null) disables it.COMMENT
HIGHpydantic_ai_slim/pydantic_ai/profiles/google.py310 # `$defs`/`$ref` and `anyOf [X, null]` have no OpenAPI-subset equivalent, so definitions areCOMMENT
HIGHtests/test_streaming.py5749 content_delta='force_download":false,"vendor_metadata":null,"kind":"image-url","media_type":"image/jCODE
HIGHtests/test_streaming.py5755 content='{"get_image":{"url":"https://t3.ftcdn.net/jpg/00/85/79/92/360_F_85799278_0BBGV9OAdQDTLnKwAPCODE
HIGHtests/test_mcp.py1840 """Non-string/dict/list values (ints, bools, null) in the config flow throughSTRING
HIGHtests/test_ag_ui.py5331 'content': '["Image analysis result",{"data":"aW1n","media_type":"image/png","vendor_metadata":null,"kinCODE
HIGHtests/test_ag_ui.py5339 'content': '{"url":"https://example.com/image.jpg","force_download":false,"vendor_metadata":null,"kind":CODE
HIGHtests/test_ag_ui.py7626 Anything that fails validation (missing, null, non-bool, non-dict payload, non-dictSTRING
HIGHtests/models/test_openrouter.py146 # final usage chunk (which has native_finish_reason: null, see cassette for details)COMMENT
HIGHtests/models/test_openrouter.py1279 # (not null) when `max_tokens` is unset.COMMENT
HIGHtests/models/test_openrouter.py1922 OpenRouter intermittently returns `{"choices": null, ...}` with no error field at all (a providerSTRING
HIGHtests/models/test_openrouter.py1973 `_OpenRouterChatCompletionChunk.choices` is required and non-null, so this chunk is rejected inSTRING
HIGHtests/durable_exec/test_prefect.py383 content='{"index":0,"part":{"tool_name":"get_country","args":"","tooCODE
HIGHtests/durable_exec/test_prefect.py386 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"{}CODE
HIGHtests/durable_exec/test_prefect.py389 content='{"index":0,"part":{"tool_name":"get_country","args":"{}","tCODE
HIGHtests/durable_exec/test_prefect.py427 content='{"index":0,"part":{"tool_name":"get_weather","args":"","tooCODE
HIGHtests/durable_exec/test_prefect.py430 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"{\CODE
HIGHtests/durable_exec/test_prefect.py433 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"tyCODE
HIGHtests/durable_exec/test_prefect.py436 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"\\CODE
HIGHtests/durable_exec/test_prefect.py439 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"o CODE
HIGHtests/durable_exec/test_prefect.py442 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"tyCODE
HIGHtests/durable_exec/test_prefect.py445 content='{"index":0,"part":{"tool_name":"get_weather","args":"{\\"ciCODE
HIGHtests/durable_exec/test_prefect.py448 content='{"index":1,"part":{"tool_name":"get_product_name","args":""CODE
HIGHtests/durable_exec/test_prefect.py451 content='{"index":1,"delta":{"tool_name_delta":null,"args_delta":"{}CODE
HIGHtests/durable_exec/test_prefect.py454 content='{"index":1,"part":{"tool_name":"get_product_name","args":"{CODE
HIGHtests/durable_exec/test_prefect.py526 content='{"index":0,"part":{"tool_name":"final_result","args":"","toCODE
HIGHtests/durable_exec/test_prefect.py532 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"{\CODE
HIGHtests/durable_exec/test_prefect.py535 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"anCODE
HIGHtests/durable_exec/test_prefect.py538 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"\\CODE
HIGHtests/durable_exec/test_prefect.py541 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"{\CODE
HIGHtests/durable_exec/test_prefect.py544 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"laCODE
HIGHtests/durable_exec/test_prefect.py547 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"\\CODE
HIGHtests/durable_exec/test_prefect.py550 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"CaCODE
HIGHtests/durable_exec/test_prefect.py553 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":" oCODE
HIGHtests/durable_exec/test_prefect.py556 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":" tCODE
HIGHtests/durable_exec/test_prefect.py559 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":" cCODE
HIGHtests/durable_exec/test_prefect.py562 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"\\CODE
HIGHtests/durable_exec/test_prefect.py565 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"anCODE
HIGHtests/durable_exec/test_prefect.py568 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"\\CODE
HIGHtests/durable_exec/test_prefect.py571 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"MeCODE
HIGHtests/durable_exec/test_prefect.py574 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":" CCODE
HIGHtests/durable_exec/test_prefect.py577 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"\\CODE
HIGHtests/durable_exec/test_prefect.py580 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"laCODE
HIGHtests/durable_exec/test_prefect.py583 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"\\CODE
HIGHtests/durable_exec/test_prefect.py586 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"WeCODE
HIGHtests/durable_exec/test_prefect.py589 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":" iCODE
HIGHtests/durable_exec/test_prefect.py592 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":" tCODE
HIGHtests/durable_exec/test_prefect.py595 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":" cCODE
HIGHtests/durable_exec/test_prefect.py598 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"\\CODE
HIGHtests/durable_exec/test_prefect.py601 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"anCODE
HIGHtests/durable_exec/test_prefect.py604 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"\\CODE
HIGHtests/durable_exec/test_prefect.py607 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"SuCODE
HIGHtests/durable_exec/test_prefect.py610 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"\\CODE
HIGHtests/durable_exec/test_prefect.py613 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"laCODE
HIGHtests/durable_exec/test_prefect.py616 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"\\CODE
HIGHtests/durable_exec/test_prefect.py619 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":"PrCODE
HIGHtests/durable_exec/test_prefect.py622 content='{"index":0,"delta":{"tool_name_delta":null,"args_delta":" nCODE
229 more matches not shown…
Unused Imports1038 hits · 877 pts
SeverityFileLineSnippetContext
LOWpydantic_ai_slim/pydantic_ai/_output.py1CODE
LOWpydantic_ai_slim/pydantic_ai/retries.py14CODE
LOWpydantic_ai_slim/pydantic_ai/_thinking_part.py1CODE
LOWpydantic_ai_slim/pydantic_ai/_uuid.py9CODE
LOWpydantic_ai_slim/pydantic_ai/_enqueue.py7CODE
LOWpydantic_ai_slim/pydantic_ai/run.py1CODE
LOWpydantic_ai_slim/pydantic_ai/tool_manager.py1CODE
LOWpydantic_ai_slim/pydantic_ai/format_prompt.py1CODE
LOWpydantic_ai_slim/pydantic_ai/_instrumentation.py1CODE
LOWpydantic_ai_slim/pydantic_ai/_tool_search.py23CODE
LOWpydantic_ai_slim/pydantic_ai/_cost.py3CODE
LOWpydantic_ai_slim/pydantic_ai/_http.py3CODE
LOWpydantic_ai_slim/pydantic_ai/_http.py10CODE
LOWpydantic_ai_slim/pydantic_ai/_mcp.py1CODE
LOWpydantic_ai_slim/pydantic_ai/tools.py1CODE
LOWpydantic_ai_slim/pydantic_ai/tools.py15CODE
LOWpydantic_ai_slim/pydantic_ai/tools.py15CODE
LOWpydantic_ai_slim/pydantic_ai/tools.py15CODE
LOWpydantic_ai_slim/pydantic_ai/tools.py15CODE
LOWpydantic_ai_slim/pydantic_ai/tools.py15CODE
LOWpydantic_ai_slim/pydantic_ai/tools.py15CODE
LOWpydantic_ai_slim/pydantic_ai/tools.py15CODE
LOWpydantic_ai_slim/pydantic_ai/_deferred_capabilities.py3CODE
LOWpydantic_ai_slim/pydantic_ai/_ssrf.py8CODE
LOWpydantic_ai_slim/pydantic_ai/function_signature.py8CODE
LOWpydantic_ai_slim/pydantic_ai/concurrency.py3CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py3CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py4CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py4CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py4CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py4CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py4CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py4CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py4CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py4CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py4CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py4CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py16CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py17CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py17CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py17CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py18CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py18CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py18CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py18CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py24CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py24CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py24CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py24CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py30CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py30CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py30CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py30CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py30CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py30CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py30CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py30CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py30CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py30CODE
LOWpydantic_ai_slim/pydantic_ai/__init__.py30CODE
978 more matches not shown…
Decorative Section Separators218 hits · 765 pts
SeverityFileLineSnippetContext
MEDIUMpydantic_ai_slim/pydantic_ai/function_signature.py34# =============================================================================COMMENT
MEDIUMpydantic_ai_slim/pydantic_ai/function_signature.py36# =============================================================================COMMENT
MEDIUMpydantic_ai_slim/pydantic_ai/function_signature.py91# =============================================================================COMMENT
MEDIUMpydantic_ai_slim/pydantic_ai/function_signature.py93# =============================================================================COMMENT
MEDIUMpydantic_ai_slim/pydantic_ai/function_signature.py458# =============================================================================COMMENT
MEDIUMpydantic_ai_slim/pydantic_ai/function_signature.py460# =============================================================================COMMENT
MEDIUMpydantic_ai_slim/pydantic_ai/function_signature.py819# =============================================================================COMMENT
MEDIUMpydantic_ai_slim/pydantic_ai/function_signature.py821# =============================================================================COMMENT
MEDIUM…ic_ai_slim/pydantic_ai/capabilities/instrumentation.py148 # ------------------------------------------------------------------COMMENT
MEDIUM…ic_ai_slim/pydantic_ai/capabilities/instrumentation.py150 # ------------------------------------------------------------------COMMENT
MEDIUM…ic_ai_slim/pydantic_ai/capabilities/instrumentation.py279 # ------------------------------------------------------------------COMMENT
MEDIUM…ic_ai_slim/pydantic_ai/capabilities/instrumentation.py281 # ------------------------------------------------------------------COMMENT
MEDIUM…ic_ai_slim/pydantic_ai/capabilities/instrumentation.py321 # ------------------------------------------------------------------COMMENT
MEDIUM…ic_ai_slim/pydantic_ai/capabilities/instrumentation.py323 # ------------------------------------------------------------------COMMENT
MEDIUM…ic_ai_slim/pydantic_ai/capabilities/instrumentation.py524 # ------------------------------------------------------------------COMMENT
MEDIUM…ic_ai_slim/pydantic_ai/capabilities/instrumentation.py526 # ------------------------------------------------------------------COMMENT
MEDIUMtests/test_function_signature.py634# =============================================================================STRING
MEDIUMtests/test_function_signature.py636# =============================================================================STRING
MEDIUMtests/test_function_signature.py736# =============================================================================STRING
MEDIUMtests/test_function_signature.py738# =============================================================================STRING
MEDIUMtests/test_function_signature.py1063# =============================================================================STRING
MEDIUMtests/test_function_signature.py1065# =============================================================================STRING
MEDIUMtests/test_usage_limits.py1182# ── per_request_input_tokens_limit ──────────────────────────────────────COMMENT
MEDIUMtests/test_streaming_errors.py226# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_streaming_errors.py228# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_streaming_errors.py345# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_streaming_errors.py347# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_streaming_errors.py454# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_streaming_errors.py456# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_streaming_errors.py542# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_streaming_errors.py544# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_streaming_errors.py640# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_streaming_errors.py642# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_streaming_errors.py930# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_streaming_errors.py932# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_streaming_errors.py1140# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_streaming_errors.py1142# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_streaming_errors.py177# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_streaming_errors.py179# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_streaming_errors.py966# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_streaming_errors.py968# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_streaming_errors.py1055# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_streaming_errors.py1057# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_thinking.py116# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_thinking.py118# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_thinking.py166# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_thinking.py168# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_thinking.py1162# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_thinking.py1164# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_thinking.py1227# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_thinking.py1229# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_thinking.py80# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_thinking.py82# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/evals/test_agentic_evaluators.py365# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/evals/test_agentic_evaluators.py367# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/evals/test_agentic_evaluators.py451# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/evals/test_agentic_evaluators.py453# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/evals/test_agentic_evaluators.py671# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/evals/test_agentic_evaluators.py673# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/evals/test_agentic_evaluators.py906# ---------------------------------------------------------------------------COMMENT
158 more matches not shown…
Cross-File Repetition109 hits · 545 pts
SeverityFileLineSnippetContext
HIGHREADME.md0support_advice='hello john, your current account balance, including pending transactions, is $123.45.' block_card=false STRING
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 STRING
HIGHdocs/index.md0support_advice='hello john, your current account balance, including pending transactions, is $123.45.' block_card=false STRING
HIGHexamples/pydantic_ai_examples/bank_support.py0support_advice='hello john, your current account balance, including pending transactions, is $123.45.' block_card=false STRING
HIGHREADME.md0support_advice="i'm sorry to hear that, john. we are temporarily blocking your card to prevent unauthorized transactionsSTRING
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 transactionsSTRING
HIGHdocs/index.md0support_advice="i'm sorry to hear that, john. we are temporarily blocking your card to prevent unauthorized transactionsSTRING
HIGHexamples/pydantic_ai_examples/bank_support.py0support_advice="i'm sorry to hear that, john. we are temporarily blocking your card to prevent unauthorized transactionsSTRING
HIGHpydantic_ai_slim/pydantic_ai/run.py0metadata associated with this agent run, if configured.STRING
HIGHpydantic_ai_slim/pydantic_ai/result.py0metadata associated with this agent run, if configured.STRING
HIGHpydantic_ai_slim/pydantic_ai/_run_context.py0metadata associated with this agent run, if configured.STRING
HIGHpydantic_ai_slim/pydantic_ai/exceptions.py0metadata associated with this agent run, if configured.STRING
HIGHpydantic_ai_slim/pydantic_ai/providers/cerebras.py0create a new z.ai provider. args: api_key: the api key to use for authentication, if not provided, the `zai_api_key` envSTRING
HIGHpydantic_ai_slim/pydantic_ai/providers/crusoe.py0create a new z.ai provider. args: api_key: the api key to use for authentication, if not provided, the `zai_api_key` envSTRING
HIGHpydantic_ai_slim/pydantic_ai/providers/zai.py0create a new z.ai provider. args: api_key: the api key to use for authentication, if not provided, the `zai_api_key` envSTRING
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.STRING
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.STRING
HIGHdocs/gateway.md0the first known use of "hello, world" was in a 1974 textbook about the c programming language.STRING
HIGHdocs/logfire.md0the first known use of "hello, world" was in a 1974 textbook about the c programming language.STRING
HIGHpydantic_ai_slim/pydantic_ai/agent/abstract.py0print(agent_run.result.output) #> the capital of france is paris. ``` args: user_prompt: user input to start/continue thSTRING
HIGHpydantic_ai_slim/pydantic_ai/agent/__init__.py0print(agent_run.result.output) #> the capital of france is paris. ``` args: user_prompt: user input to start/continue thSTRING
HIGHpydantic_ai_slim/pydantic_ai/agent/wrapper.py0print(agent_run.result.output) #> the capital of france is paris. ``` args: user_prompt: user input to start/continue thSTRING
HIGH…ic_ai_slim/pydantic_ai/durable_exec/temporal/_agent.py0print(agent_run.result.output) #> the capital of france is paris. ``` args: user_prompt: user input to start/continue thSTRING
HIGH…dantic_ai_slim/pydantic_ai/durable_exec/dbos/_agent.py0print(agent_run.result.output) #> the capital of france is paris. ``` args: user_prompt: user input to start/continue thSTRING
HIGH…tic_ai_slim/pydantic_ai/durable_exec/prefect/_agent.py0print(agent_run.result.output) #> the capital of france is paris. ``` args: user_prompt: user input to start/continue thSTRING
HIGHpydantic_ai_slim/pydantic_ai/agent/abstract.py0a contextmanager which can be used to iterate over the agent graph's nodes as they are executed. this method builds an iSTRING
HIGHpydantic_ai_slim/pydantic_ai/agent/wrapper.py0a contextmanager which can be used to iterate over the agent graph's nodes as they are executed. this method builds an iSTRING
HIGHpydantic_ai_slim/pydantic_ai/agent/__init__.py0a contextmanager which can be used to iterate over the agent graph's nodes as they are executed. this method builds an iSTRING
HIGH…ic_ai_slim/pydantic_ai/durable_exec/temporal/_agent.py0a contextmanager which can be used to iterate over the agent graph's nodes as they are executed. this method builds an iSTRING
HIGH…dantic_ai_slim/pydantic_ai/durable_exec/dbos/_agent.py0a contextmanager which can be used to iterate over the agent graph's nodes as they are executed. this method builds an iSTRING
HIGH…tic_ai_slim/pydantic_ai/durable_exec/prefect/_agent.py0a contextmanager which can be used to iterate over the agent graph's nodes as they are executed. this method builds an iSTRING
HIGHpydantic_ai_slim/pydantic_ai/agent/abstract.py0context manager to temporarily override agent configuration. this is particularly useful when testing. you can find an eSTRING
HIGHpydantic_ai_slim/pydantic_ai/agent/wrapper.py0context manager to temporarily override agent configuration. this is particularly useful when testing. you can find an eSTRING
HIGH…ic_ai_slim/pydantic_ai/durable_exec/temporal/_agent.py0context manager to temporarily override agent configuration. this is particularly useful when testing. you can find an eSTRING
HIGH…dantic_ai_slim/pydantic_ai/durable_exec/dbos/_agent.py0context manager to temporarily override agent configuration. this is particularly useful when testing. you can find an eSTRING
HIGH…tic_ai_slim/pydantic_ai/durable_exec/prefect/_agent.py0context manager to temporarily override agent configuration. this is particularly useful when testing. you can find an eSTRING
HIGHpydantic_ai_slim/pydantic_ai/models/cerebras.py0possible z.ai model names. since z.ai supports a variety of models and the list changes frequently, we explicitly list kSTRING
HIGHpydantic_ai_slim/pydantic_ai/models/crusoe.py0possible z.ai model names. since z.ai supports a variety of models and the list changes frequently, we explicitly list kSTRING
HIGHpydantic_ai_slim/pydantic_ai/models/zai.py0possible z.ai model names. since z.ai supports a variety of models and the list changes frequently, we explicitly list kSTRING
HIGHpydantic_ai_slim/pydantic_ai/models/cerebras.py0initialize a snowflake cortex model. args: model_name: the name of the snowflake cortex model to use. provider: the provSTRING
HIGHpydantic_ai_slim/pydantic_ai/models/zai.py0initialize a snowflake cortex model. args: model_name: the name of the snowflake cortex model to use. provider: the provSTRING
HIGHpydantic_ai_slim/pydantic_ai/models/snowflake.py0initialize a snowflake cortex model. args: model_name: the name of the snowflake cortex model to use. provider: the provSTRING
HIGHpydantic_ai_slim/pydantic_ai/models/mistral.py0process a non-streamed response, and prepare a message to return.STRING
HIGHpydantic_ai_slim/pydantic_ai/models/groq.py0process a non-streamed response, and prepare a message to return.STRING
HIGHpydantic_ai_slim/pydantic_ai/models/openai.py0process a non-streamed response, and prepare a message to return.STRING
HIGHpydantic_ai_slim/pydantic_ai/models/huggingface.py0process a non-streamed response, and prepare a message to return.STRING
HIGHpydantic_ai_slim/pydantic_ai/models/anthropic.py0process a non-streamed response, and prepare a message to return.STRING
HIGHpydantic_ai_slim/pydantic_ai/models/cohere.py0process a non-streamed response, and prepare a message to return.STRING
HIGHpydantic_ai_slim/pydantic_ai/models/mistral.py0process a streamed response, and prepare a streaming response to return.STRING
HIGHpydantic_ai_slim/pydantic_ai/models/google.py0process a streamed response, and prepare a streaming response to return.STRING
HIGHpydantic_ai_slim/pydantic_ai/models/groq.py0process a streamed response, and prepare a streaming response to return.STRING
HIGHpydantic_ai_slim/pydantic_ai/models/openai.py0process a streamed response, and prepare a streaming response to return.STRING
HIGHpydantic_ai_slim/pydantic_ai/models/huggingface.py0process a streamed response, and prepare a streaming response to return.STRING
HIGHpydantic_ai_slim/pydantic_ai/models/xai.py0process a streamed response, and prepare a streaming response to return.STRING
HIGHpydantic_ai_slim/pydantic_ai/models/groq.py0initialize a bedrock model. args: model_name: the name of the model to use. model_name: the name of the bedrock model toSTRING
HIGHpydantic_ai_slim/pydantic_ai/models/cohere.py0initialize a bedrock model. args: model_name: the name of the model to use. model_name: the name of the bedrock model toSTRING
HIGHpydantic_ai_slim/pydantic_ai/models/bedrock.py0initialize a bedrock model. args: model_name: the name of the model to use. model_name: the name of the bedrock model toSTRING
HIGHpydantic_ai_slim/pydantic_ai/models/groq.py0the set of builtin tool types this model can handle.STRING
HIGHpydantic_ai_slim/pydantic_ai/models/openai.py0the set of builtin tool types this model can handle.STRING
HIGHpydantic_ai_slim/pydantic_ai/models/xai.py0the set of builtin tool types this model can handle.STRING
49 more matches not shown…
Magic Placeholder Names72 hits · 392 pts
SeverityFileLineSnippetContext
HIGHclai/README.md22export OPENAI_API_KEY='your-api-key-here'CODE
HIGHtests/providers/test_ovhcloud.py32 provider = OVHcloudProvider(api_key='your-api-key')CODE
HIGHtests/providers/test_ovhcloud.py36 assert provider.client.api_key == 'your-api-key'CODE
HIGHtests/providers/test_ovhcloud.py52 openai_client = openai.AsyncOpenAI(api_key='your-api-key')CODE
HIGHtests/providers/test_ovhcloud.py59 provider = OVHcloudProvider(api_key='your-api-key', http_client=http_client)CODE
HIGHtests/providers/test_ovhcloud.py61 assert provider.client.api_key == 'your-api-key'CODE
HIGHtests/providers/test_ovhcloud.py65 provider = OVHcloudProvider(api_key='your-api-key')CODE
HIGHtests/providers/test_google.py236 env.set(api_key_env_var, 'your-api-key')CODE
HIGHtests/providers/test_google.py239 assert provider.client._api_client.api_key == 'your-api-key' # pyright: ignore[reportPrivateUsage]CODE
HIGHtests/providers/test_google.py271 env.set('GOOGLE_API_KEY', 'your-api-key')CODE
HIGHtests/providers/test_google.py276 assert provider.client._api_client.api_key == 'your-api-key' # pyright: ignore[reportPrivateUsage]CODE
HIGHtests/providers/test_google.py287 provider = GoogleCloudProvider(api_key='your-api-key')CODE
HIGHtests/providers/test_google.py288 assert provider.client._api_client.api_key == 'your-api-key' # pyright: ignore[reportPrivateUsage]CODE
HIGHtests/providers/test_google.py298 api_key='your-api-key', credentials=credentials, project='pydantic-ai', location='us-central1'CODE
HIGHdocs/cli.md38export OPENAI_API_KEY='your-api-key-here'CODE
HIGHdocs/embeddings.md170export OPENAI_API_KEY='your-api-key'CODE
HIGHdocs/embeddings.md242 api_key='your-api-key',CODE
HIGHdocs/embeddings.md276export GOOGLE_API_KEY='your-api-key'CODE
HIGHdocs/embeddings.md397export CO_API_KEY='your-api-key'CODE
HIGHdocs/embeddings.md453export VOYAGE_API_KEY='your-api-key'CODE
HIGHdocs/models/xai.md22export XAI_API_KEY='your-api-key'CODE
HIGHdocs/models/xai.md54provider = XaiProvider(api_key='your-api-key')CODE
HIGHdocs/models/xai.md68 api_key='your-api-key',CODE
HIGHdocs/models/xai.md87 api_key='your-api-key',CODE
HIGHdocs/models/xai.md106xai_client = AsyncClient(api_key='your-api-key')CODE
HIGHdocs/models/anthropic.md22export ANTHROPIC_API_KEY='your-api-key'CODE
HIGHdocs/models/anthropic.md60 'claude-sonnet-4-5', provider=AnthropicProvider(api_key='your-api-key')CODE
HIGHdocs/models/anthropic.md80 provider=AnthropicProvider(api_key='your-api-key', http_client=custom_http_client),CODE
HIGHdocs/models/anthropic.md269 api_key='your-api-key',CODE
HIGHdocs/models/groq.md22export GROQ_API_KEY='your-api-key'CODE
HIGHdocs/models/groq.md55 'llama-3.3-70b-versatile', provider=GroqProvider(api_key='your-api-key')CODE
HIGHdocs/models/groq.md73 provider=GroqProvider(api_key='your-api-key', http_client=custom_http_client),CODE
HIGHdocs/models/openai.md20export OPENAI_API_KEY='your-api-key'CODE
HIGHdocs/models/openai.md57model = OpenAIResponsesModel('gpt-5.2', provider=OpenAIProvider(api_key='your-api-key'))CODE
HIGHdocs/models/openai.md92 api_key='your-api-key',CODE
HIGHdocs/models/openai.md483 base_url='https://<openai-compatible-api-endpoint>', api_key='your-api-key'CODE
HIGHdocs/models/openai.md509 base_url='https://<openai-compatible-api-endpoint>.com', api_key='your-api-key'CODE
HIGHdocs/models/openai.md624 provider=AlibabaProvider(api_key='your-api-key'),CODE
HIGHdocs/models/openai.md640 api_key='your-api-key',CODE
HIGHdocs/models/openai.md677 api_key='your-api-key',CODE
HIGHdocs/models/openai.md702 api_key='your-api-key',CODE
HIGHdocs/models/openai.md739 api_key='your-api-key',CODE
HIGHdocs/models/openai.md1010 provider=OVHcloudProvider(api_key='your-api-key'),CODE
HIGHdocs/models/openai.md1044 provider=SambaNovaProvider(api_key='your-api-key'),CODE
HIGHdocs/models/openai.md1064 api_key='your-api-key',CODE
HIGHdocs/models/bedrock.md38export AWS_BEARER_TOKEN_BEDROCK='your-api-key'CODE
HIGHdocs/models/ollama.md25export OLLAMA_API_KEY='your-api-key' # required for Ollama CloudCODE
HIGHdocs/models/cohere.md22export CO_API_KEY='your-api-key'CODE
HIGHdocs/models/cohere.md54model = CohereModel('command-r7b-12-2024', provider=CohereProvider(api_key='your-api-key'))CODE
HIGHdocs/models/cohere.md71 provider=CohereProvider(api_key='your-api-key', http_client=custom_http_client),CODE
HIGHdocs/models/crusoe.md22export CRUSOE_API_KEY='your-api-key'CODE
HIGHdocs/models/crusoe.md62model = CrusoeModel('zai/GLM-5.2', provider=CrusoeProvider(api_key='your-api-key'))CODE
HIGHdocs/models/crusoe.md79 provider=CrusoeProvider(api_key='your-api-key', http_client=custom_http_client),CODE
HIGHdocs/models/mistral.md22export MISTRAL_API_KEY='your-api-key'CODE
HIGHdocs/models/mistral.md55 'mistral-large-latest', provider=MistralProvider(api_key='your-api-key', base_url='https://<mistral-provider-endpoinCODE
HIGHdocs/models/mistral.md73 provider=MistralProvider(api_key='your-api-key', http_client=custom_http_client),CODE
HIGHdocs/models/cerebras.md22export CEREBRAS_API_KEY='your-api-key'CODE
HIGHdocs/models/cerebras.md55 'llama-3.3-70b', provider=CerebrasProvider(api_key='your-api-key')CODE
HIGHdocs/models/cerebras.md73 provider=CerebrasProvider(api_key='your-api-key', http_client=custom_http_client),CODE
HIGHdocs/models/google.md31export GOOGLE_API_KEY=your-api-keyCODE
12 more matches not shown…
Docstring Block Structure59 hits · 295 pts
SeverityFileLineSnippetContext
HIGHpydantic_ai_slim/pydantic_ai/_output.py367Execute an output function with error handling, converting `ModelRetry` to `ToolRetryError`. Tracing for output-funSTRING
HIGHpydantic_ai_slim/pydantic_ai/retries.py196Handle an HTTP request with retry logic. Args: request: The HTTP request to handle. ReturnSTRING
HIGHpydantic_ai_slim/pydantic_ai/retries.py299Handle an async HTTP request with retry logic. Args: request: The HTTP request to handle. STRING
HIGHpydantic_ai_slim/pydantic_ai/retries.py382Handle an HTTP request with retry logic. Args: request: The HTTP request to handle. ReturnSTRING
HIGHpydantic_ai_slim/pydantic_ai/retries.py468Handle an async HTTP request with retry logic. Args: request: The HTTP request to handle. STRING
HIGHpydantic_ai_slim/pydantic_ai/tool_manager.py701Execute a validated tool call via capability hooks. The Instrumentation capability (if present) creates trace sSTRING
HIGHpydantic_ai_slim/pydantic_ai/tool_manager.py1040Handle a tool call by validating the arguments, calling the tool, and handling retries. This is a convenience mSTRING
HIGHpydantic_ai_slim/pydantic_ai/_ssrf.py319Validate that the URL uses an allowed protocol (http or https). Args: url: The URL to validate. ReturnSTRING
HIGHpydantic_ai_slim/pydantic_ai/_ssrf.py406Validate URL and resolve hostname to IP addresses. Performs protocol validation, DNS resolution, and IP validation.STRING
HIGHpydantic_ai_slim/pydantic_ai/_ssrf.py571Download content from a URL with SSRF protection. This function: 1. Validates the URL protocol (only http/httpsSTRING
HIGHpydantic_ai_slim/pydantic_ai/_run_context.py479Enqueue content to be injected into the conversation. Safe to call from anywhere a `RunContext` is available — STRING
HIGHpydantic_ai_slim/pydantic_ai/mcp.py1588Read the contents of a specific resource by URI. Args: uri: The URI of the resource to read, or a [STRING
HIGHpydantic_ai_slim/pydantic_ai/mcp.py1878Recursively expand environment variables in a JSON structure. Environment variables can be referenced using `${VAR_STRING
HIGHpydantic_ai_slim/pydantic_ai/mcp.py1922Load `MCPToolset`s from a configuration file. The configuration file uses the same `mcpServers` JSON shape as ClaudSTRING
HIGHpydantic_ai_slim/pydantic_ai/messages.py3430Apply this text delta to an existing `TextPart`. Args: part: The existing model response part, whicSTRING
HIGHpydantic_ai_slim/pydantic_ai/messages.py3495Apply this thinking delta to an existing `ThinkingPart`. Args: part: The existing model response paSTRING
HIGHpydantic_ai_slim/pydantic_ai/messages.py3629Apply this delta to a part or delta, returning a new part or delta with the changes applied. Args: STRING
HIGHpydantic_ai_slim/pydantic_ai/messages.py3777Apply this delta to an existing `SpeechPart`. `transcript` replaces the part's transcript when set, which is hoSTRING
HIGHpydantic_ai_slim/pydantic_ai/direct.py63Make a non-streamed request to a model. ```py title="model_request_example.py" from pydantic_ai import ModelReqSTRING
HIGHpydantic_ai_slim/pydantic_ai/direct.py116Make a Synchronous, non-streamed request to a model. This is a convenience method that wraps [`model_request`][pydaSTRING
HIGHpydantic_ai_slim/pydantic_ai/direct.py172Make a streamed async request to a model. ```py {title="model_request_stream_example.py"} from pydantic_ai impSTRING
HIGHpydantic_ai_slim/pydantic_ai/direct.py235Make a streamed synchronous request to a model. This is the synchronous version of [`model_request_stream`][pydantiSTRING
HIGHpydantic_ai_slim/pydantic_ai/_parts_manager.py163Handle incoming text content, creating or updating a TextPart in the manager as appropriate. When `vendor_part_STRING
HIGHpydantic_ai_slim/pydantic_ai/_parts_manager.py261Handle incoming thinking content, creating or updating a ThinkingPart in the manager as appropriate. When `vendSTRING
HIGHpydantic_ai_slim/pydantic_ai/_parts_manager.py368Handle or update a tool call, creating or updating a `ToolCallPart`, `NativeToolCallPart`, or `ToolCallPartDelta`. STRING
HIGHpydantic_ai_slim/pydantic_ai/_utils.py802Check if a callable takes a `RunContext` as its first argument. Args: callable_obj: The callable to check. STRING
HIGHpydantic_ai_slim/pydantic_ai/_utils.py822Get the type annotation of the first parameter of a callable. Handles regular functions, methods, and callable clasSTRING
HIGHpydantic_ai_slim/pydantic_ai/ui/vercel_ai/_utils.py94Dump provider metadata from keyword arguments. Args: wrapper_key: The key to wrap the metadata in. DefaultsSTRING
HIGHpydantic_ai_slim/pydantic_ai/ui/_web/app.py176Create a Starlette app that serves a web chat UI for the given agent. By default, the UI is fetched from a CDN and STRING
HIGHpydantic_ai_slim/pydantic_ai/embeddings/__init__.py334Count the number of tokens in the given text. Args: text: The text to tokenize and count. STRING
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 integeSTRING
HIGHpydantic_ai_slim/pydantic_ai/embeddings/base.py104Count the number of tokens in the given text. Args: text: The text to tokenize and count. STRING
HIGHpydantic_ai_slim/pydantic_ai/models/cerebras.py134Transforms a 'CerebrasModelSettings' object into an 'OpenAIChatModelSettings' object. Args: model_settings:STRING
HIGHpydantic_ai_slim/pydantic_ai/models/instrumented.py93Create instrumentation options. Args: tracer_provider: The OpenTelemetry tracer provider to use. STRING
HIGHpydantic_ai_slim/pydantic_ai/models/openrouter.py615Transforms a 'OpenRouterModelSettings' object into an 'OpenAIChatModelSettings' object. Args: model_settingSTRING
HIGHpydantic_ai_slim/pydantic_ai/models/zai.py152Transforms a 'ZaiModelSettings' object into an 'OpenAIChatModelSettings' object. Maps the unified `thinking` settinSTRING
HIGHpydantic_ai_slim/pydantic_ai/models/snowflake.py296Transforms a `SnowflakeModelSettings` object into an `OpenAIChatModelSettings` object. Args: model_settingsSTRING
HIGHpydantic_ai_slim/pydantic_ai/models/bedrock.py416Insert a cache point before trailing document/video content. AWS rejects cache points that directly follow documentSTRING
HIGHpydantic_ai_slim/pydantic_ai/models/_tool_choice.py17Resolve user-facing tool_choice into a canonical form for providers. Pydantic AI distinguishes between function tooSTRING
HIGHpydantic_ai_slim/pydantic_ai/realtime/model.py188Open a connection to the realtime model. Args: messages: Prior conversation and the current requestSTRING
HIGHpydantic_evals/pydantic_evals/generation.py42Use an LLM to generate a dataset of test cases, each consisting of input, expected output, and metadata. This functSTRING
HIGHpydantic_evals/pydantic_evals/dataset.py564Load a dataset from a file. Args: path: Path to the file to load. fmt: Format of the fiSTRING
HIGHpydantic_evals/pydantic_evals/dataset.py607Load a dataset from a string. Args: contents: The string content to parse. fmt: Format STRING
HIGHpydantic_evals/pydantic_evals/dataset.py645Load a dataset from a dictionary. Args: data: Dictionary representation of the dataset. STRING
HIGHpydantic_evals/pydantic_evals/dataset.py879Infer the format to use for a file based on its extension. Args: path: The path to infer the formatSTRING
HIGHpydantic_evals/pydantic_evals/dataset.py951Run a task on a case and return the context for evaluators. Args: task: The task to run. case: The STRING
HIGHpydantic_evals/pydantic_evals/_utils.py50Get the name of a function, unwrapping partials and decorators. Args: func: The function to get the name ofSTRING
HIGH…ntic_evals/pydantic_evals/evaluators/_run_evaluator.py40Run an evaluator and return the results. This function runs an evaluator on the given context and processes the resSTRING
HIGH…ntic_evals/pydantic_evals/evaluators/llm_as_a_judge.py330Judge an output using a G-Eval style chain-of-thought prompt. This is a simplified implementation of G-Eval (Liu etSTRING
HIGHpydantic_graph/pydantic_graph/join.py236Attempt to run the join node. Args: ctx: The graph execution context Returns: STRING
HIGHpydantic_graph/pydantic_graph/step.py185Attempt to run the step node. Args: ctx: The graph execution context Returns: STRING
HIGHpydantic_graph/pydantic_graph/step.py238Execute the wrapped node with the step context. Args: ctx: The step context containing the node insSTRING
HIGHpydantic_graph/pydantic_graph/node.py82Force type variance for proper generic typing. This method exists solely for type checking purposes and should STRING
HIGHpydantic_graph/pydantic_graph/graph_builder.py206Get the parent fork information for a join node. Args: join_id: The ID of the join node ReSTRING
HIGHpydantic_graph/pydantic_graph/graph_builder.py521Get the trace parent for instrumentation. Args: required: Whether to raise an error if no tracepareSTRING
HIGHpydantic_graph/pydantic_graph/graph_builder.py1590Create an edge path from a `BaseNode` class. This method integrates a `BaseNode` subclass into the builder grapSTRING
HIGHpydantic_graph/pydantic_graph/graph_builder.py1644Create edges from a return type hint. This method analyzes return type hints from step functions or node methodSTRING
HIGHpydantic_graph/pydantic_graph/graph_builder.py1712Build the final executable graph from the accumulated nodes and edges. This method performs validation, normaliSTRING
HIGHpydantic_graph/pydantic_graph/graph_builder.py1945Find the dominating fork for each join node in the graph. This function analyzes the graph structure to find the paSTRING
Deep Nesting330 hits · 271 pts
SeverityFileLineSnippetContext
LOWpydantic_ai_slim/pydantic_ai/_output.py126CODE
LOWpydantic_ai_slim/pydantic_ai/_output.py1563CODE
LOWpydantic_ai_slim/pydantic_ai/_output.py450CODE
LOWpydantic_ai_slim/pydantic_ai/retries.py514CODE
LOWpydantic_ai_slim/pydantic_ai/retries.py562CODE
LOWpydantic_ai_slim/pydantic_ai/format_prompt.py135CODE
LOWpydantic_ai_slim/pydantic_ai/format_prompt.py187CODE
LOWpydantic_ai_slim/pydantic_ai/_instrumentation.py346CODE
LOWpydantic_ai_slim/pydantic_ai/_tool_search.py471CODE
LOWpydantic_ai_slim/pydantic_ai/_mcp.py22CODE
LOWpydantic_ai_slim/pydantic_ai/_mcp.py74CODE
LOWpydantic_ai_slim/pydantic_ai/_deferred_capabilities.py175CODE
LOWpydantic_ai_slim/pydantic_ai/_ssrf.py561CODE
LOWpydantic_ai_slim/pydantic_ai/_ssrf.py808CODE
LOWpydantic_ai_slim/pydantic_ai/function_signature.py538CODE
LOWpydantic_ai_slim/pydantic_ai/function_signature.py592CODE
LOWpydantic_ai_slim/pydantic_ai/function_signature.py371CODE
LOWpydantic_ai_slim/pydantic_ai/_function_schema.py110CODE
LOWpydantic_ai_slim/pydantic_ai/_spec.py96CODE
LOWpydantic_ai_slim/pydantic_ai/result.py1065CODE
LOWpydantic_ai_slim/pydantic_ai/result.py244CODE
LOWpydantic_ai_slim/pydantic_ai/result.py423CODE
LOWpydantic_ai_slim/pydantic_ai/mcp.py1788CODE
LOWpydantic_ai_slim/pydantic_ai/mcp.py1848CODE
LOWpydantic_ai_slim/pydantic_ai/mcp.py1165CODE
LOWpydantic_ai_slim/pydantic_ai/_tool_execution.py204CODE
LOWpydantic_ai_slim/pydantic_ai/_tool_execution.py654CODE
LOWpydantic_ai_slim/pydantic_ai/_tool_execution.py736CODE
LOWpydantic_ai_slim/pydantic_ai/_tool_execution.py921CODE
LOWpydantic_ai_slim/pydantic_ai/_tool_execution.py1121CODE
LOWpydantic_ai_slim/pydantic_ai/_json_schema.py59CODE
LOWpydantic_ai_slim/pydantic_ai/_json_schema.py91CODE
LOWpydantic_ai_slim/pydantic_ai/_deferred.py124CODE
LOWpydantic_ai_slim/pydantic_ai/messages.py2775CODE
LOWpydantic_ai_slim/pydantic_ai/messages.py2849CODE
LOWpydantic_ai_slim/pydantic_ai/messages.py2895CODE
LOWpydantic_ai_slim/pydantic_ai/messages.py2954CODE
LOWpydantic_ai_slim/pydantic_ai/messages.py686CODE
LOWpydantic_ai_slim/pydantic_ai/messages.py916CODE
LOWpydantic_ai_slim/pydantic_ai/messages.py1102CODE
LOWpydantic_ai_slim/pydantic_ai/messages.py1354CODE
LOWpydantic_ai_slim/pydantic_ai/messages.py1408CODE
LOWpydantic_ai_slim/pydantic_ai/messages.py2703CODE
LOWpydantic_ai_slim/pydantic_ai/messages.py3494CODE
LOWpydantic_ai_slim/pydantic_ai/_cancel.py244CODE
LOWpydantic_ai_slim/pydantic_ai/_parts_manager.py152CODE
LOWpydantic_ai_slim/pydantic_ai/_parts_manager.py358CODE
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py765CODE
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py911CODE
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py2710CODE
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py2820CODE
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py2905CODE
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py524CODE
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py661CODE
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py708CODE
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py1141CODE
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py1891CODE
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py1897CODE
LOWpydantic_ai_slim/pydantic_ai/_utils.py450CODE
LOWpydantic_ai_slim/pydantic_ai/_utils.py943CODE
270 more matches not shown…
Self-Referential Comments89 hits · 250 pts
SeverityFileLineSnippetContext
MEDIUMpydantic_ai_slim/pydantic_ai/concurrency.py224 # Create a span for observability while waitingCOMMENT
MEDIUMpydantic_ai_slim/pydantic_ai/_json_schema.py213 # Create a new schema based on the non-null part, mark as nullableCOMMENT
MEDIUMpydantic_ai_slim/pydantic_ai/_parts_manager.py1"""This module provides functionality to manage and update parts of a model's streamed response.STRING
MEDIUMpydantic_ai_slim/pydantic_ai/providers/gateway.py1"""This module implements the Pydantic AI Gateway provider."""STRING
MEDIUMpydantic_ai_slim/pydantic_ai/models/__init__.py525 # This method is not required, but you need to implement it if you want to support `UsageLimits.count_tokens_befCOMMENT
MEDIUMpydantic_ai_slim/pydantic_ai/models/__init__.py551 # This method is not required, but you need to implement it if you want to support streamed responsesCOMMENT
MEDIUMpydantic_ai_slim/pydantic_ai/models/huggingface.py138 # This class is a placeholder for any future huggingface-specific settingsCOMMENT
MEDIUMpydantic_ai_slim/pydantic_ai/models/cohere.py112 # This class is a placeholder for any future cohere-specific settingsCOMMENT
MEDIUM…tic_ai_slim/pydantic_ai/durable_exec/prefect/_agent.py193 # Create a task to handle each eventCOMMENT
MEDIUMtests/test_toolsets.py753 # Create a toolset with tools that can failCOMMENT
MEDIUMtests/test_ui_web.py1115 # Create a test HTML fileCOMMENT
MEDIUMtests/test_ui_web.py1128 # Create a test HTML fileCOMMENT
MEDIUMtests/test_tenacity.py487 # Create a retry state with no exceptionCOMMENT
MEDIUMtests/test_tenacity.py501 # Create a retry state with a non-HTTP exceptionCOMMENT
MEDIUMtests/test_tenacity.py597 # Create a future date (30 seconds from now)COMMENT
MEDIUMtests/test_tenacity.py645 # Create a past dateCOMMENT
MEDIUMtests/test_tenacity.py670 # Create a future date (120 seconds from now, > max_wait)COMMENT
MEDIUMtests/test_tenacity.py715 # Create a retry state with no exception to trigger fallbackCOMMENT
MEDIUMtests/test_function_signature.py1087 # Create a function with bare generic annotation (typing.List, not list)STRING
MEDIUMtests/test_usage_limits.py670 # Create a usage with None in details (simulating model response with missing detail)COMMENT
MEDIUMtests/test_json_schema.py60 # Create a schema with $defs that should not be modifiedCOMMENT
MEDIUMtests/evals/test_evaluator_common.py262 # Create a mock GradingOutputCOMMENT
MEDIUMtests/evals/test_evaluator_common.py466 # Create a span tree with a known structureCOMMENT
MEDIUMtests/evals/test_evaluator_context.py22 # Create a mock span treeCOMMENT
MEDIUMtests/evals/test_evaluator_context.py25 # Create a context with all fields populatedCOMMENT
MEDIUMtests/evals/test_evaluators.py563 # Create a span tree with a known structureCOMMENT
MEDIUMtests/evals/test_evaluators.py569 # Create a context with this span treeCOMMENT
MEDIUMtests/evals/test_evaluators.py103 # Create a specCOMMENT
MEDIUMtests/evals/test_evaluators.py182 # Create a context with the correct object typing for IsInstanceCOMMENT
MEDIUMtests/evals/test_evaluators.py205 # Create a context with DifferentOutputCOMMENT
MEDIUMtests/evals/test_reports.py111 # Create a new caseCOMMENT
MEDIUMtests/evals/test_reports.py139 # Create a case aggregateCOMMENT
MEDIUMtests/evals/test_reports.py175 # Create an evaluator outputCOMMENT
MEDIUMtests/evals/test_reports.py183 # Create a caseCOMMENT
MEDIUMtests/evals/test_reports.py201 # Create a report with the error caseCOMMENT
MEDIUMtests/evals/test_dataset.py1703 # This function is tough to test in an interesting way outside an example...COMMENT
MEDIUMtests/evals/test_otel.py666 # Create a simple tree for testing negationCOMMENT
MEDIUMtests/evals/test_otel.py863 # Create a test span treeCOMMENT
MEDIUMtests/evals/test_otel.py898 # Create a tree with varying numbers of childrenCOMMENT
MEDIUMtests/providers/test_litellm.py123 # Create a real AsyncClient for the mockCOMMENT
MEDIUMtests/graph/builder/test_graph_builder.py397 # Create a cycle that doesn't reach the end nodeCOMMENT
MEDIUMtests/models/test_anthropic.py627 # Create a mock model instanceCOMMENT
MEDIUMtests/models/test_anthropic.py633 # Create a list with an unsupported param type (thinking)COMMENT
MEDIUMtests/models/test_anthropic.py607 # Create a UserPromptPart with CachePointCOMMENT
MEDIUMtests/models/test_anthropic.py990 # Create a mock client that looks like standard AsyncAnthropicCOMMENT
MEDIUMtests/models/test_anthropic.py7319 # Create a model instanceSTRING
MEDIUMtests/models/test_anthropic.py7390 # Create a model instanceSTRING
MEDIUMtests/models/test_anthropic.py7431 # Create a model instanceSTRING
MEDIUMtests/models/test_anthropic.py9645 # Create the first mock response with server tool blocksSTRING
MEDIUMtests/models/test_anthropic.py9677 # Create the second mock response that references the historySTRING
MEDIUMtests/models/test_anthropic.py9706 # Create the first mock response with server tool blocksSTRING
MEDIUMtests/models/test_anthropic.py9737 # Create the second mock response that references the historySTRING
MEDIUMtests/models/test_anthropic.py12843 # Create a message history with a container_id in provider_detailsSTRING
MEDIUMtests/models/test_anthropic.py12867 # Create a message history with a container_idSTRING
MEDIUMtests/models/test_openai.py3410 # Create a mock completion for testingCOMMENT
MEDIUMtests/models/test_openai.py3802 # Create a mock response with logprobsCOMMENT
MEDIUMtests/models/mock_xai.py322 # Create the chunk tool call (delta)COMMENT
MEDIUMtests/models/test_model_settings.py49 # Create a base model with settingsCOMMENT
MEDIUMtests/models/test_model_settings.py87 # Create a base model with settingsCOMMENT
MEDIUMtests/models/test_model_settings.py132 # Create a function that captures the merged settingsCOMMENT
29 more matches not shown…
AI Slop Vocabulary76 hits · 203 pts
SeverityFileLineSnippetContext
LOWpydantic_ai_slim/pydantic_ai/_output.py345 # Text output: no real validation, just pass through the textCOMMENT
LOWpydantic_ai_slim/pydantic_ai/_json_schema.py220 # they are both null, so just return one of themCOMMENT
LOWpydantic_ai_slim/pydantic_ai/_utils.py633 # If we already have a buffered item, just return it.COMMENT
MEDIUM…_slim/pydantic_ai/capabilities/process_event_stream.py97 # the observer form returns an awaitable. Introspecting the return is robust forCOMMENT
LOWpydantic_ai_slim/pydantic_ai/models/mistral.py829 # It seems that mistral just sends full tool calls, so we just use them directly, rather than buildiCOMMENT
LOW…dantic_ai_slim/pydantic_ai/durable_exec/dbos/_model.py113 # If not in a workflow (could be in a step), just call the wrapped request_stream method.COMMENT
LOW…tic_ai_slim/pydantic_ai/durable_exec/prefect/_model.py137 # If not in a flow, just call the wrapped request_stream methodCOMMENT
LOWpydantic_ai_slim/pydantic_ai/realtime/model.py297 # can drop a claim the provider made and not just add to it.COMMENT
MEDIUMtests/conftest.py364 # example printing from inside a running event loop trips the detector on the harness's ownCOMMENT
MEDIUMtests/test_examples.py116 # (harness imports, the Coder blocks-equivalence fragment, interactive realtimeCOMMENT
MEDIUMtests/models/test_model_settings_support.py575 # that as "not forwarded" would let a harness failure quietly agree with a stale list.COMMENT
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_CODE
MEDIUM…l_mcp_list_tools_stream_backfills_missing_results.yaml397 data: {"type":"response.completed","response":{"id":"resp_034c5e93e2fa45ad006a2c2b74c2e4819dafbd93fcd1b49697","oCODE
MEDIUM…l_mcp_list_tools_stream_backfills_missing_results.yaml397 data: {"type":"response.completed","response":{"id":"resp_034c5e93e2fa45ad006a2c2b74c2e4819dafbd93fcd1b49697","oCODE
MEDIUM…l_mcp_list_tools_stream_backfills_missing_results.yaml397 data: {"type":"response.completed","response":{"id":"resp_034c5e93e2fa45ad006a2c2b74c2e4819dafbd93fcd1b49697","oCODE
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_00b9cc7a23d047CODE
MEDIUM…est_openai_responses_model_mcp_server_tool_stream.yaml619 data: {"type":"response.completed","sequence_number":193,"response":{"id":"resp_00b9cc7a23d047270068faa0e2593481CODE
MEDIUM…est_openai_responses_model_mcp_server_tool_stream.yaml619 data: {"type":"response.completed","sequence_number":193,"response":{"id":"resp_00b9cc7a23d047270068faa0e2593481CODE
LOWtests/durable_exec/test_dbos.py339 # DBOSAgent already wraps the `run` function as a DBOS workflow, so we can just call it directly.COMMENT
LOWtests/durable_exec/test_dbos.py837 # DBOSAgent already wraps the `run` function as a DBOS workflow, so we can just call it directly.COMMENT
MEDIUMtests/realtime/test_session.py3463 # `state_restored=True` stands, so an app is not told a seamless renewal was a disruption.COMMENT
LOW…antic_evals/pydantic_evals/reporting/render_numbers.py30 # If it's an int, just return its string representation.COMMENT
MEDIUM.github/zizmor.yml50 # `harness-compat.yml` calls a reusable workflow in `pydantic/pydantic-ai-harness`, anCOMMENT
MEDIUM.github/zizmor.yml52 # would force coordinated bumps on every harness change without meaningful security benefitCOMMENT
MEDIUM.github/workflows/harness-compat.yml3# Verifies that pydantic-ai changes don't break the pydantic-ai-harness lint /COMMENT
MEDIUM.github/workflows/harness-compat.yml4# typecheck / test suite. Calls the harness's `compat-test.yml` reusableCOMMENT
MEDIUM.github/workflows/harness-compat.yml11# - Push of `v*` tags: gates a release on harness compatibility.COMMENT
MEDIUM.github/workflows/harness-compat.yml35 # on every harness change without security benefit. Ignore configured in `.github/zizmor.yml`.COMMENT
MEDIUM.github/workflows/ci.yml56 # which imports pydantic-ai-harness. The harness depends on pydantic-ai-slim,COMMENT
MEDIUM.github/workflows/ci.yml144 # re-sync the venv and drop the out-of-band harness install above.COMMENT
MEDIUM.github/workflows/latest-versions-canary.yml181 # `make install` without `--frozen`, and without the `pydantic-ai-harness` pin it addsCOMMENT
MEDIUM.github/scripts/prewarm-pydantic-ai-runner.sh2# Pre-warm the harness's uv script environment on the OPEN network.COMMENT
MEDIUM.github/scripts/test_pydantic_ai_runner.py1618 # The harness `write_file` requires an existing parent; the Write adapterCOMMENT
MEDIUM.github/scripts/test_pydantic_ai_runner.py1629 # harness does NOT convert to `ModelRetry`. It must come back as an `error:`COMMENT
MEDIUM.github/scripts/test_pydantic_ai_runner.py779 # TodoWrite maps Claude's todo schema onto the harness `planning` capabilityCOMMENT
MEDIUM.github/scripts/test_pydantic_ai_runner.py454 # The harness-backed Read/Write/Edit are contained to the workspace root.STRING
MEDIUM.github/scripts/test_pydantic_ai_runner.py464 # The harness requires a unique match; a missing string comes back as an error.STRING
MEDIUM.github/scripts/test_pydantic_ai_runner.py473 # Claude's 1-based offset=2 maps to the harness 0-based offset; limit=2.STRING
MEDIUM.github/scripts/test_pydantic_ai_runner.py480 # The harness's truncation hint carries its own 0-based offset; this tool'sSTRING
MEDIUM.github/scripts/test_pydantic_ai_runner.py487 assert 'Use offset=3 to continue reading.' in first # harness emits 2 (0-based); bumped to 3STRING
MEDIUM.github/scripts/test_pydantic_ai_runner.py495 # Passed straight to the harness, `limit=0` reads zero lines and emits aSTRING
MEDIUM.github/scripts/test_pydantic_ai_runner.py521 # The harness puts its continuation hint at the tail, but the shim's output capSTRING
MEDIUM.github/scripts/test_pydantic_ai_runner.py529 # Zero-padded line ids (distinct from the harness's space-padded line numbers)STRING
MEDIUM.github/scripts/test_pydantic_ai_runner.py546 # The offset bump must target only the harness's own continuation hint, not fileSTRING
MEDIUM.github/scripts/test_pydantic_ai_runner.py547 # content -- even a line reproducing the *full* hint verbatim. The harness writesSTRING
MEDIUM.github/scripts/test_pydantic_ai_runner.py559 # `replace_all` has no harness equivalent, so it stays an in-place rewriteSTRING
MEDIUM.github/scripts/test_pydantic_ai_runner.py569 # `replace_all` does the rewrite by hand rather than through the harness, butSTRING
MEDIUM.github/scripts/test_pydantic_ai_runner.py588 # The harness *returns* a `[Command timed out ...]` sentinel rather thanSTRING
MEDIUM.github/scripts/test_pydantic_ai_runner.py608 # grep runs ripgrep through the harness shell capability; the adapter keys offSTRING
MEDIUM.github/scripts/test_pydantic_ai_runner.py611 # exit-1 ("nothing matched") to the harness's own `No matches found.` sentinel.STRING
MEDIUM.github/scripts/test_pydantic_ai_runner.py690 # The harness `list_directory`/`find_files` walkers hide every dot-prefixedSTRING
MEDIUM.github/scripts/test_pydantic_ai_runner.py507 # The harness converts only a fixed set of exceptions to `ModelRetry`; a bareSTRING
MEDIUM.github/scripts/test_pydantic_ai_runner.py644 # A match set larger than the harness output cap is tail-truncated, whichSTRING
MEDIUM.github/scripts/agent_spend_report.py63# gh-aw's harness logs `attempt N failed` on *any* non-zero exit, before it decidesCOMMENT
MEDIUM.github/scripts/agent_spend_report.py67# Mirrors the detector in gh-aw's own harness (`actions/setup/js/claude_harness.cjs`),COMMENT
MEDIUM.github/scripts/pydantic_ai_gh_aw_shim/list_dir.py21 # the enumeration then keeps the dot-prefixed entries the harness drops.COMMENT
MEDIUM.github/scripts/pydantic_ai_gh_aw_shim/list_dir.py28 # harness, so catch it here rather than let it abort the whole run.COMMENT
MEDIUM.github/scripts/pydantic_ai_gh_aw_shim/write.py26 # The harness converts its own recoverable errors to `ModelRetry`, butCOMMENT
MEDIUM.github/scripts/pydantic_ai_gh_aw_shim/bash.py24 # ModelRetry: the harness blocked the command; the shim's tools have alwaysCOMMENT
MEDIUM.github/scripts/pydantic_ai_gh_aw_shim/bash.py27 # workspace cwd does not exist) -- the harness doesn't convert it, so catchCOMMENT
16 more matches not shown…
Over-Commented Block211 hits · 200 pts
SeverityFileLineSnippetContext
LOWpyproject.toml421 "ignore: '_UnionGenericAlias' is deprecated and slated for removal:DeprecationWarning:google.genai",COMMENT
LOWpydantic_ai_slim/pyproject.toml121# `websockets` is intentionally a direct dependency here (via `realtime`) even where a providerCOMMENT
LOWpydantic_ai_slim/pyproject.toml141# EvalsCOMMENT
LOWpydantic_ai_slim/pydantic_ai/tool_manager.py1101 # makes it `'unapproved'`, an external tool `'external'` — as well as by raising. The graphCOMMENT
LOWpydantic_ai_slim/pydantic_ai/_instrumentation.py621 second_most_recent_request = last_two_requests[1]COMMENT
LOWpydantic_ai_slim/pydantic_ai/_run_context.py441 # Loading a deferred capability discloses its tools as a bundle — the load exchange carriesCOMMENT
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py801 t = await tCOMMENT
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py841 allow_image_output=output_schema.allows_image,COMMENT
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py1241 await asyncio.wait({ready_waiter, wrap_task}, return_when=asyncio.FIRST_COMPLETED)COMMENT
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py1561 # Merge possible consecutive trailing `ModelRequest`s into one, with tool call parts before user parts,COMMENT
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py1581 # to local-shape `ToolSearch*Part` when they came from another provider or theCOMMENT
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py2121 #COMMENT
LOWpydantic_ai_slim/pydantic_ai/ui/_event_stream.py321 # Pending output-tool call (stored via FinalResultEvent if the call event hasn't fired yet)COMMENT
LOW…ntic_ai_slim/pydantic_ai/ui/vercel_ai/_event_stream.py421 # happens when the agent raises before yielding the call event (e.g. output-toolCOMMENT
LOW…ntic_ai_slim/pydantic_ai/ui/vercel_ai/_event_stream.py461 # `'success'` and `'interrupted'` both render as neutral tool output. Only `'failed'` isCOMMENT
LOWpydantic_ai_slim/pydantic_ai/ui/_web/api.py21AgentDepsT = TypeVar('AgentDepsT')COMMENT
LOW…antic_ai_slim/pydantic_ai/capabilities/_tool_search.py161 if self.strategy == 'keywords' or callable(self.strategy):COMMENT
LOW…antic_ai_slim/pydantic_ai/capabilities/_tool_search.py181 # `ToolSearchTool` builtin is registered with `optional=False` (seeCOMMENT
LOW…_slim/pydantic_ai/capabilities/process_event_stream.py121 # it can legitimately be resumed elsewhere (a `StreamedRunResult` consumed in another task,COMMENT
LOW…ydantic_ai/capabilities/_deferred_capability_loader.py41async def _render_deferred_capability_catalog(ctx: RunContext[AgentDepsT]) -> str:COMMENT
LOWpydantic_ai_slim/pydantic_ai/providers/moonshotai.py61 return self._clientCOMMENT
LOWpydantic_ai_slim/pydantic_ai/providers/mistral.py21# Models with adjustable reasoning via `reasoning_effort` (opt-in, unlike always-on `magistral`):COMMENT
LOWpydantic_ai_slim/pydantic_ai/providers/openrouter.py181COMMENT
LOWpydantic_ai_slim/pydantic_ai/providers/openai.py41 return self._clientCOMMENT
LOWpydantic_ai_slim/pydantic_ai/providers/bedrock.py41 ) from _import_errorCOMMENT
LOWpydantic_ai_slim/pydantic_ai/agent/__init__.py201 # wrap_run cooperative hand-off protocol:COMMENT
LOWpydantic_ai_slim/pydantic_ai/agent/__init__.py1561 # can see it on `RunContext.metadata`. Metadata factories receive theCOMMENT
LOWpydantic_ai_slim/pydantic_ai/agent/__init__.py1781 # at all, or be isolated as a tool failure, is a separate semantics question trackedCOMMENT
LOWpydantic_ai_slim/pydantic_ai/agent/__init__.py2901 # gather over the same children): the `override(native_tools=...)` merge below needs theCOMMENT
LOWpydantic_ai_slim/pydantic_ai/agent/__init__.py3481 model_request_parameters = models.ModelRequestParameters(COMMENT
LOWpydantic_ai_slim/pydantic_ai/models/__init__.py741 # would erase legitimate announcements. The agent path always passes parameters, soCOMMENT
LOWpydantic_ai_slim/pydantic_ai/models/__init__.py1061 raiseCOMMENT
LOWpydantic_ai_slim/pydantic_ai/models/__init__.py2461 transformed: list[ModelMessage] = []COMMENT
LOWpydantic_ai_slim/pydantic_ai/models/google.py1421 self.provider_details['safety_ratings'] = [COMMENT
LOWpydantic_ai_slim/pydantic_ai/models/groq.py881 failed_generation: strCOMMENT
LOWpydantic_ai_slim/pydantic_ai/models/openai.py3021 elif isinstance(tool, ImageGenerationTool):COMMENT
LOWpydantic_ai_slim/pydantic_ai/models/openai.py3261 elif isinstance(part, ToolAvailabilityDeltaPart):COMMENT
LOWpydantic_ai_slim/pydantic_ai/models/openai.py5041 # https://github.com/pydantic/genai-prices/pull/463 (in 0.1.4), but not every OpenAI-compatibleCOMMENT
LOWpydantic_ai_slim/pydantic_ai/models/anthropic.py281_NON_AUTOMATIC_CACHING_CLIENTS = (AsyncAnthropicBedrock, AsyncAnthropicVertex)COMMENT
LOWpydantic_ai_slim/pydantic_ai/models/anthropic.py1161 model_request_parameters,COMMENT
LOWpydantic_ai_slim/pydantic_ai/models/anthropic.py1681 # callable), covering the no-history single-turn custom callable case too (where the localCOMMENT
LOWpydantic_ai_slim/pydantic_ai/models/anthropic.py1701 # Filter `tool_reference` entries during replay against the tools the current turnCOMMENT
LOWpydantic_ai_slim/pydantic_ai/models/anthropic.py1741 system_prompt_parts.append(request_part.content)COMMENT
LOWpydantic_ai_slim/pydantic_ai/models/anthropic.py1761 # that message, which is everything the entry and this turn build on.COMMENT
LOWpydantic_ai_slim/pydantic_ai/models/_continuation.py181 merged = replace(new, usage=existing.usage + new.usage)COMMENT
LOWpydantic_ai_slim/pydantic_ai/models/_continuation.py261 max_background_polls: int = MAX_BACKGROUND_POLLSCOMMENT
LOWpydantic_ai_slim/pydantic_ai/models/_continuation.py581 alone would leave each segment's `request_stream(...)` context manager (and itsCOMMENT
LOW…_ai_slim/pydantic_ai/durable_exec/temporal/_logfire.py21 # every `Client.connect()` would silently discard the host's own configuration (scrubbing patterns,COMMENT
LOW…_ai_slim/pydantic_ai/durable_exec/temporal/__init__.py101 'sniffio',COMMENT
LOW…_ai_slim/pydantic_ai/durable_exec/temporal/__init__.py121 # accesses `client.chat.completions` or `client.responses`. Without passthrough, Temporal reloadsCOMMENT
LOW…slim/pydantic_ai/durable_exec/temporal/_run_context.py41# Fields that `serialize_run_context` doesn't carry but that are still readable inside an activity,COMMENT
LOW…im/pydantic_ai/durable_exec/prefect/_cache_policies.py81 'retries': value.retries,COMMENT
LOWpydantic_ai_slim/pydantic_ai/realtime/google.py1041 # classic `GoogleModel` (`NativeToolCallPart.provider_name`), so a turn's history is provider-taggedCOMMENT
LOWpydantic_ai_slim/pydantic_ai/realtime/_session.py661 self._output_audio = bytearray()COMMENT
LOWpydantic_ai_slim/pydantic_ai/realtime/_session.py681 # `_open_user_turn_anchor`. `_pending_user_turn_anchor` holds the anchor of a turn that has begunCOMMENT
LOWpydantic_ai_slim/pydantic_ai/realtime/_session.py721 self._pending_tool_calls: dict[str, tuple[asyncio.Task[None], ToolCallPart]] = {}COMMENT
LOWpydantic_ai_slim/pydantic_ai/realtime/openai.py381 self._response_active = FalseCOMMENT
LOWpydantic_ai_slim/pydantic_ai/realtime/openai.py821COMMENT
LOW…antic_ai_slim/pydantic_ai/realtime/_openai_protocol.py861 # A rejected config, a malformed frame, or a timeout: all arrive over the open WebSocket andCOMMENT
LOWpydantic_ai_slim/pydantic_ai/profiles/google.py201 # model`. Verified live against all four the Developer API serves — the threeCOMMENT
151 more matches not shown…
Modern AI Meta-Vocabulary63 hits · 160 pts
SeverityFileLineSnippetContext
MEDIUM.pre-commit-config.yaml9 # gh-aw compiles *.md agentic workflows into *.lock.yml, and alsoCOMMENT
MEDIUMCONTRIBUTING.md28Before writing code, ask whether the change needs to live in core at all. Most new agent behaviors belong in [**PydanticCODE
MEDIUMpydantic_ai_slim/pydantic_ai/native_tools/__init__.py175 * Groq, see <https://console.groq.com/docs/agentic-tooling#search-settings>STRING
MEDIUMpydantic_ai_slim/pydantic_ai/native_tools/__init__.py188 * Groq, see <https://console.groq.com/docs/agentic-tooling#search-settings>STRING
MEDIUMpydantic_ai_slim/pydantic_ai/providers/deepseek.py58 # Starting from DeepSeek v3.2, DeepSeek requires sending thinking parts for optimal agentic performance.COMMENT
MEDIUM…building-pydantic-ai-agents/references/ARCHITECTURE.md11 - [Choosing a Multi-Agent Pattern](#choosing-a-multi-agent-pattern)CODE
MEDIUM…ai-agents/references/ORCHESTRATION-AND-INTEGRATIONS.md103## Use Embeddings for RAGCOMMENT
MEDIUM…langchain-to-pydantic-ai/references/CONCEPT-MAPPING.md13- [Graphs and multi-agent systems](#graphs-and-multi-agent-systems)CODE
MEDIUM…langchain-to-pydantic-ai/references/CONCEPT-MAPPING.md173## Graphs and multi-agent systemsCOMMENT
MEDIUMtests/evals/test_evaluator_common.py557 # An empty steps list would produce a prompt with no chain-of-thought section, defeating the method.COMMENT
MEDIUMtests/models/test_anthropic.py7109dataclass is used to pass data, connections, and logic into the model that will be needed when running[instructions](ageCODE
MEDIUMtests/models/test_anthropic.py7112[instructions](agents/#instructions)can be registered with thedecorator, and can make use of dependency injection. DepenCODE
MEDIUMtests/models/test_anthropic.py7180dataclass is used to pass data, connections, and logic into the model that will be needed when running[instructions](ageCODE
MEDIUMtests/models/test_anthropic.py7183[instructions](agents/#instructions)can be registered with thedecorator, and can make use of dependency injection. DepenCODE
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_CODE
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_CODE
MEDIUM…ttes/test_anthropic/test_anthropic_web_fetch_tool.yaml188 dataclass is used to pass data, connections, and logic into the model that will be needed when running[iCODE
MEDIUM…ttes/test_anthropic/test_anthropic_web_fetch_tool.yaml191 [instructions](agents/#instructions)can be registered with thedecorator, and can make use of dependency CODE
MEDIUM…ttes/test_anthropic/test_anthropic_web_fetch_tool.yaml259 dataclass is used to pass data, connections, and logic into the model that will be needed when running[iCODE
MEDIUM…ttes/test_anthropic/test_anthropic_web_fetch_tool.yaml262 [instructions](agents/#instructions)can be registered with thedecorator, and can make use of dependency CODE
MEDIUM…ttes/test_anthropic/test_anthropic_web_fetch_tool.yaml540 dataclass is used to pass data, connections, and logic into the model that will be needed when runningCODE
MEDIUM…ttes/test_anthropic/test_anthropic_web_fetch_tool.yaml543 [instructions](agents/#instructions)can be registered with thedecorator, and can make use of dependencCODE
MEDIUM…ttes/test_anthropic/test_anthropic_web_fetch_tool.yaml611 dataclass is used to pass data, connections, and logic into the model that will be needed when runningCODE
MEDIUM…ttes/test_anthropic/test_anthropic_web_fetch_tool.yaml614 [instructions](agents/#instructions)can be registered with thedecorator, and can make use of dependencCODE
MEDIUM…st_anthropic/test_anthropic_web_fetch_tool_stream.yaml117 data: {"type":"content_block_start","index":2,"content_block":{"type":"web_fetch_tool_result","tool_use_id":"srvCODE
MEDIUM…st_anthropic/test_anthropic_web_fetch_tool_stream.yaml117 data: {"type":"content_block_start","index":2,"content_block":{"type":"web_fetch_tool_result","tool_use_id":"srvCODE
MEDIUM…st_anthropic/test_anthropic_web_fetch_tool_stream.yaml117 data: {"type":"content_block_start","index":2,"content_block":{"type":"web_fetch_tool_result","tool_use_id":"srvCODE
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_00b9cc7a23d047CODE
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_00b9cc7a23d047CODE
MEDIUM…est_openai_responses_model_mcp_server_tool_stream.yaml619 data: {"type":"response.completed","sequence_number":193,"response":{"id":"resp_00b9cc7a23d047270068faa0e2593481CODE
MEDIUM…est_openai_responses_model_mcp_server_tool_stream.yaml619 data: {"type":"response.completed","sequence_number":193,"response":{"id":"resp_00b9cc7a23d047270068faa0e2593481CODE
MEDIUM…est_openai_responses_model_mcp_server_tool_stream.yaml619 data: {"type":"response.completed","sequence_number":193,"response":{"id":"resp_00b9cc7a23d047270068faa0e2593481CODE
MEDIUM…est_openai_responses_model_mcp_server_tool_stream.yaml619 data: {"type":"response.completed","sequence_number":193,"response":{"id":"resp_00b9cc7a23d047270068faa0e2593481CODE
MEDIUMdocs/coding-agent-skills.md5[Agent skills](https://agentskills.io) are packages of instructions and reference material that coding agents load on deCODE
MEDIUMdocs/embeddings.md96## Using embeddings for RAGCOMMENT
MEDIUMdocs/extensibility.md45[**Pydantic AI Harness**](https://pydantic.dev/docs/ai/harness/) is the official capability library for Pydantic AI -- sCODE
MEDIUMdocs/multi-agent-applications.md394# Your multi-agent code here...COMMENT
MEDIUMdocs/index.md3791. The `SupportDependencies` dataclass is used to pass data, connections, and logic into the model that will be needed wCODE
MEDIUMdocs/index.md3835. Dynamic [instructions](agent.md#instructions) can make use of dependency injection. Dependencies are carried via the CODE
MEDIUMdocs/contributing.md28Before writing code, ask whether the change needs to live in core at all. Most new agent behaviors belong in [**PydanticCODE
MEDIUMdocs/AGENTS.md9- Pin an explicit `{#custom-id}` on a heading as soon as anything links to it and its generated id would surprise the peCODE
MEDIUMdocs/CLAUDE.md9- Pin an explicit `{#custom-id}` on a heading as soon as anything links to it and its generated id would surprise the peCODE
MEDIUMdocs/toolsets.md935[`pydantic-ai-ejentum`](https://pypi.org/project/pydantic-ai-ejentum/) wraps the [Ejentum Reasoning Harness](https://ejeCODE
MEDIUMdocs/evals/evaluators/llm-judge.md237### RAG EvaluationCOMMENT
MEDIUMdocs/evals/evaluators/span-based.md487### RAG System VerificationCOMMENT
MEDIUMdocs/evals/evaluators/standard-quality-metrics.md64## RAG metric rubricsCOMMENT
MEDIUMdocs/evals/evaluators/agentic.md180### RAG agentCOMMENT
MEDIUMdocs/capabilities/overview.md109| [Guardrails](https://pydantic.dev/docs/ai/harness/guardrails/) | Harness | Validate/block/redact user input, tool callCODE
MEDIUMdocs/capabilities/third-party.md25## Guardrails & Safety {#guardrails-safety}COMMENT
MEDIUMdocs/capabilities/third-party.md27[Pydantic AI Harness](https://pydantic.dev/docs/ai/harness/guardrails/) provides input and output guardrails that validaCODE
MEDIUMdocs/capabilities/third-party.md49## Retrieval & RAG {#retrieval-rag}COMMENT
MEDIUMdocs/capabilities/reinject-system-prompt.md3[`ReinjectSystemPrompt`][pydantic_ai.capabilities.ReinjectSystemPrompt] is a [capability](overview.md) that ensures the CODE
MEDIUMdocs/models/anthropic.md192Anthropic's [task budgets](https://platform.claude.com/docs/en/build-with-claude/task-budgets) let you give Claude an adCODE
MEDIUMdocs/models/bedrock.md68configurations](https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html) and [performance settings](https:/CODE
MEDIUMdocs/examples/rag.md1# RAGCOMMENT
MEDIUMdocs/examples/ag-ui.md89#### Agentic Chat - Code {#agentic-chat-code}COMMENT
MEDIUMdocs/examples/ag-ui.md106#### Agentic Generative UI - Code {#agentic-generative-ui-code}COMMENT
MEDIUMpydantic_evals/pydantic_evals/evaluators/__init__.py43 # agenticCOMMENT
MEDIUM.github/zizmor.yml30 # gh-aw-generated agentic workflow lockfiles (seeCOMMENT
MEDIUM.github/zizmor.yml59 # workflow-dispatch maintenance surface for the agentic workflow set).COMMENT
3 more matches not shown…
Dead Code73 hits · 132 pts
SeverityFileLineSnippetContext
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py625CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py634CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py643CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py656CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py664CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py672CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py680CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py690CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py699CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py709CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py719CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py728CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py740CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py749CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py758CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py767CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py776CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py785CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py794CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py803CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py812CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py821CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py833CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py842CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py851CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py863CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py872CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py881CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py896CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py908CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/_event_stream.py917CODE
MEDIUM…ntic_ai_slim/pydantic_ai/ui/vercel_ai/_event_stream.py175CODE
MEDIUM…ntic_ai_slim/pydantic_ai/ui/vercel_ai/_event_stream.py310CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/ag_ui/_event_stream.py203CODE
MEDIUMpydantic_ai_slim/pydantic_ai/ui/ag_ui/_event_stream.py262CODE
MEDIUMpydantic_ai_slim/pydantic_ai/agent/abstract.py1657CODE
MEDIUMpydantic_ai_slim/pydantic_ai/agent/abstract.py1700CODE
MEDIUMpydantic_ai_slim/pydantic_ai/agent/abstract.py1831CODE
MEDIUMpydantic_ai_slim/pydantic_ai/agent/abstract.py1860CODE
MEDIUMpydantic_ai_slim/pydantic_ai/models/__init__.py555CODE
MEDIUMpydantic_ai_slim/pydantic_ai/models/__init__.py1140CODE
MEDIUMpydantic_ai_slim/pydantic_ai/models/mcp_sampling.py86CODE
MEDIUM…dantic_ai_slim/pydantic_ai/durable_exec/dbos/_agent.py970CODE
MEDIUMtests/test_ui.py896CODE
MEDIUMtests/test_ui.py900CODE
MEDIUMtests/test_ui.py904CODE
MEDIUMtests/test_ui.py908CODE
MEDIUMtests/test_ui.py912CODE
MEDIUMtests/test_ui.py919CODE
MEDIUMtests/test_ui.py923CODE
MEDIUMtests/test_ui.py1087CODE
MEDIUMtests/test_ag_ui.py545CODE
MEDIUMtests/models/test_continuation_stream.py666CODE
MEDIUMtests/models/test_continuation_stream.py1091CODE
MEDIUMtests/models/test_fallback.py679CODE
MEDIUMtests/models/test_fallback.py720CODE
MEDIUMtests/models/test_fallback.py2584CODE
MEDIUMtests/models/test_fallback.py2746CODE
MEDIUMtests/models/test_fallback.py2820CODE
MEDIUMtests/models/test_fallback.py2876CODE
13 more matches not shown…
AI Structural Patterns155 hits · 128 pts
SeverityFileLineSnippetContext
LOWpydantic_ai_slim/pydantic_ai/tools.py318CODE
LOWpydantic_ai_slim/pydantic_ai/mcp.py868CODE
LOWpydantic_ai_slim/pydantic_ai/ui/_adapter.py473CODE
LOWpydantic_ai_slim/pydantic_ai/ui/_adapter.py575CODE
LOWpydantic_ai_slim/pydantic_ai/ui/_adapter.py645CODE
LOWpydantic_ai_slim/pydantic_ai/ui/vercel_ai/_adapter.py208CODE
LOWpydantic_ai_slim/pydantic_ai/ui/_web/app.py165CODE
LOW…c_ai_slim/pydantic_ai/capabilities/image_generation.py112CODE
LOWpydantic_ai_slim/pydantic_ai/capabilities/hooks.py751CODE
LOWpydantic_ai_slim/pydantic_ai/capabilities/web_fetch.py43CODE
LOWpydantic_ai_slim/pydantic_ai/capabilities/capability.py139CODE
LOWpydantic_ai_slim/pydantic_ai/capabilities/capability.py160CODE
LOWpydantic_ai_slim/pydantic_ai/capabilities/capability.py209CODE
LOWpydantic_ai_slim/pydantic_ai/capabilities/capability.py230CODE
LOWpydantic_ai_slim/pydantic_ai/capabilities/mcp.py58CODE
LOWpydantic_ai_slim/pydantic_ai/capabilities/mcp.py216CODE
LOWpydantic_ai_slim/pydantic_ai/capabilities/web_search.py51CODE
LOWpydantic_ai_slim/pydantic_ai/capabilities/x_search.py75CODE
LOWpydantic_ai_slim/pydantic_ai/providers/google_cloud.py29CODE
LOW…dantic_ai_slim/pydantic_ai/providers/bedrock_mantle.py132CODE
LOW…dantic_ai_slim/pydantic_ai/providers/bedrock_mantle.py145CODE
LOWpydantic_ai_slim/pydantic_ai/providers/azure.py226CODE
LOWpydantic_ai_slim/pydantic_ai/providers/bedrock.py591CODE
LOWpydantic_ai_slim/pydantic_ai/providers/bedrock.py604CODE
LOWpydantic_ai_slim/pydantic_ai/agent/abstract.py470CODE
LOWpydantic_ai_slim/pydantic_ai/agent/abstract.py496CODE
LOWpydantic_ai_slim/pydantic_ai/agent/abstract.py521CODE
LOWpydantic_ai_slim/pydantic_ai/agent/abstract.py666CODE
LOWpydantic_ai_slim/pydantic_ai/agent/abstract.py692CODE
LOWpydantic_ai_slim/pydantic_ai/agent/abstract.py717CODE
LOWpydantic_ai_slim/pydantic_ai/agent/abstract.py826CODE
LOWpydantic_ai_slim/pydantic_ai/agent/abstract.py852CODE
LOWpydantic_ai_slim/pydantic_ai/agent/abstract.py878CODE
LOWpydantic_ai_slim/pydantic_ai/agent/abstract.py1134CODE
LOWpydantic_ai_slim/pydantic_ai/agent/abstract.py1159CODE
LOWpydantic_ai_slim/pydantic_ai/agent/abstract.py1183CODE
LOWpydantic_ai_slim/pydantic_ai/agent/abstract.py1307CODE
LOWpydantic_ai_slim/pydantic_ai/agent/abstract.py1332CODE
LOWpydantic_ai_slim/pydantic_ai/agent/abstract.py1356CODE
LOWpydantic_ai_slim/pydantic_ai/agent/abstract.py1485CODE
LOWpydantic_ai_slim/pydantic_ai/agent/abstract.py1510CODE
LOWpydantic_ai_slim/pydantic_ai/agent/abstract.py1536CODE
LOWpydantic_ai_slim/pydantic_ai/agent/abstract.py1661CODE
LOWpydantic_ai_slim/pydantic_ai/agent/abstract.py1702CODE
LOWpydantic_ai_slim/pydantic_ai/agent/abstract.py1806CODE
LOWpydantic_ai_slim/pydantic_ai/agent/abstract.py1834CODE
LOWpydantic_ai_slim/pydantic_ai/agent/abstract.py2127CODE
LOWpydantic_ai_slim/pydantic_ai/agent/wrapper.py130CODE
LOWpydantic_ai_slim/pydantic_ai/agent/wrapper.py155CODE
LOWpydantic_ai_slim/pydantic_ai/agent/wrapper.py180CODE
LOWpydantic_ai_slim/pydantic_ai/agent/wrapper.py320CODE
LOWpydantic_ai_slim/pydantic_ai/agent/wrapper.py363CODE
LOWpydantic_ai_slim/pydantic_ai/agent/wrapper.py410CODE
LOWpydantic_ai_slim/pydantic_ai/agent/__init__.py487CODE
LOWpydantic_ai_slim/pydantic_ai/agent/__init__.py511CODE
LOWpydantic_ai_slim/pydantic_ai/agent/__init__.py534CODE
LOWpydantic_ai_slim/pydantic_ai/agent/__init__.py768CODE
LOWpydantic_ai_slim/pydantic_ai/agent/__init__.py794CODE
LOWpydantic_ai_slim/pydantic_ai/agent/__init__.py820CODE
LOWpydantic_ai_slim/pydantic_ai/agent/__init__.py935CODE
95 more matches not shown…
Fake / Example Data110 hits · 128 pts
SeverityFileLineSnippetContext
LOWpydantic_ai_slim/pydantic_ai/output.py378 #> {'name': 'John Doe', 'age': 30}STRING
LOWtests/test_agent.py284 {'name': 'John Doe'},CODE
LOWtests/test_agent.py297 Person(name='John Doe'),CODE
LOWtests/test_agent.py2415 args_json = '{"name": "John Doe", "age": 30}'STRING
LOWtests/test_agent.py2425 assert result.output == snapshot({'name': 'John Doe', 'age': 30})STRING
LOWtests/import_examples.py14 os.environ.update(OPENAI_API_KEY='fake-key', GEMINI_API_KEY='fake-key', GROQ_API_KEY='fake-key')CODE
LOWtests/test_examples.py584 args={'response': ['Matching client:', {'id': 1234, 'name': 'Jane Doe'}]},CODE
LOWtests/test_examples.py691 args={'name': 'John Doe', 'age': 30},CODE
LOWtests/test_examples.py1016 tool_name='get_user_by_name', args={'name': 'John Doe'}, tool_call_id='pyd_ai_tool_call_id'CODE
LOWtests/models/test_anthropic.py30592. The use of "John Doe" as a reference to a typical male in various contextsCODE
LOWtests/models/test_anthropic.py30603. The use of variations like "Baby Doe" and numbered "John Doe"s in specific casesCODE
LOWtests/models/test_anthropic.py3042 'This document appears to be a sample PDF file that mainly contains Lorem ipsum text, which is placeholder text CODE
LOWtests/models/test_bedrock.py1596An example text describing the use of "John Doe" as a placeholder name in legal cases, hospitals, and other contexts wheSTRING
LOWtests/models/test_bedrock.py1596An example text describing the use of "John Doe" as a placeholder name in legal cases, hospitals, and other contexts wheSTRING
LOWtests/models/test_google.py888 'The main content of the TXT file is an explanation of the placeholder name "John Doe" (and related variations) STRING
LOWtests/models/test_openai_responses.py1260 'The main content of this document is an example of a TXT file type, with an explanation of the use of placeholdSTRING
LOWtests/models/test_openai_responses.py1260 'The main content of this document is an example of a TXT file type, with an explanation of the use of placeholdSTRING
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 childrCODE
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 childrCODE
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 CODE
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 variatiCODE
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 CODE
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 ipsuCODE
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 childrCODE
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 childrCODE
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 CODE
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 CODE
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 CODE
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 caCODE
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 contextsCODE
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 casesCODE
LOW…direct-url_force_download-document-google_vertex].yaml656 The content of the document consists of several paragraphs of **Lorem Ipsum** placeholder text. The layoutCODE
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 usCODE
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 dCODE
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 FinibCODE
LOW…ix[tool_return_content-url-document-bedrock_nova].yaml475 PDF\"**. It contains **Lorem Ipsum placeholder text** organized into multiple paragraphs. The document is CODE
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 liCODE
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 EngCODE
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 intoCODE
LOW…x[tool_return_content-url-document-google_vertex].yaml297 * **Body Text:** The document contains four paragraphs of "Lorem ipsum" text, which is standard Latin plCOMMENT
LOW…ool_return_matrix[direct-url-document-google_2_5].yaml521 document contains several paragraphs of "Lorem ipsum" placeholder text.CODE
LOW…_matrix[tool_return_content-url-document-xai].xai.yaml121 followed by several paragraphs of standard Lorem Ipsum placeholder textCODE
LOW…atrix[tool_return_content-url-document-anthropic].yaml157 The PDF contains several paragraphs of **Lorem Ipsum** placeholder text - the classic dummy text commonly usedCODE
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 reCODE
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 classicCODE
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 classicCODE
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, testingCODE
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 thCODE
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 aCODE
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 CODE
LOW…rn_content-url_force_download-document-anthropic].yaml532 - The main body consists of multiple paragraphs of Latin placeholder text (Lorem Ipsum)CODE
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 amCODE
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 amCODE
LOW…irect-url_force_download-document-google_gemini3].yaml652 of **\"Lorem ipsum\"** placeholder text, commonly used in publishing and graphic design to demonstrate theCODE
LOW…irect-url_force_download-document-google_gemini3].yaml655 *\"Lorem ipsum dolor sit amet...\"*\n* **Format:** A standard text document layout with clean margins anCOMMENT
LOW…irect-url_force_download-document-google_gemini3].yaml655 *\"Lorem ipsum dolor sit amet...\"*\n* **Format:** A standard text document layout with clean margins anCOMMENT
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) --CODE
LOW…return_matrix[direct-url-document-google_gemini3].yaml662 * **Body Text:** The document contains four paragraphs of "Lorem Ipsum" placeholder text. This is standaCOMMENT
LOW…l_tool_return_matrix[direct-url-document-xai].xai.yaml159 \ PDF file. Fun fun fun.\" followed by extensive Lorem ipsum dummy text\CODE
LOW…l_tool_return_matrix[direct-url-document-xai].xai.yaml163 \ not substantive or meaningful—purely sample/lorem ipsum filler spanning\CODE
50 more matches not shown…
Excessive Try-Catch Wrapping97 hits · 100 pts
SeverityFileLineSnippetContext
LOWpydantic_ai_slim/pydantic_ai/_output.py205 except Exception as e:CODE
LOWpydantic_ai_slim/pydantic_ai/retries.py216 except Exception:CODE
LOWpydantic_ai_slim/pydantic_ai/retries.py319 except Exception:CODE
LOWpydantic_ai_slim/pydantic_ai/retries.py405 except Exception:CODE
LOWpydantic_ai_slim/pydantic_ai/retries.py491 except Exception:CODE
LOWpydantic_ai_slim/pydantic_ai/run.py342 except Exception as e:CODE
LOWpydantic_ai_slim/pydantic_ai/tool_manager.py471 except Exception as e:CODE
LOWpydantic_ai_slim/pydantic_ai/_instrumentation.py162 except Exception as e:CODE
LOWpydantic_ai_slim/pydantic_ai/_instrumentation.py226 except Exception:CODE
LOWpydantic_ai_slim/pydantic_ai/_instrumentation.py229 except Exception as e:CODE
LOWpydantic_ai_slim/pydantic_ai/_cost.py93 except Exception as e:CODE
LOWpydantic_ai_slim/pydantic_ai/_spec.py234 except Exception as e:CODE
LOWpydantic_ai_slim/pydantic_ai/_template.py30 except Exception:CODE
LOWpydantic_ai_slim/pydantic_ai/_parts_manager.py449 except Exception:CODE
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py357 except Exception:CODE
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py1265 except Exception as e:CODE
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py1336 except Exception as e:CODE
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py1435 except Exception as e:CODE
LOWpydantic_ai_slim/pydantic_ai/_agent_graph.py2541 except Exception:STRING
LOWpydantic_ai_slim/pydantic_ai/usage.py332 except Exception:CODE
LOWpydantic_ai_slim/pydantic_ai/_utils.py735 except Exception:CODE
LOWpydantic_ai_slim/pydantic_ai/ui/_event_stream.py293 except Exception as exc: # `exc` to avoid shadowing by `async for e in` belowCODE
LOWpydantic_ai_slim/pydantic_ai/ui/_event_stream.py311 except Exception:CODE
LOWpydantic_ai_slim/pydantic_ai/ui/ag_ui/_utils.py114 except Exception:CODE
LOWpydantic_ai_slim/pydantic_ai/embeddings/instrumented.py149 except Exception as e: # pragma: no coverCODE
LOWpydantic_ai_slim/pydantic_ai/embeddings/instrumented.py207 except Exception: # pragma: no coverCODE
LOWpydantic_ai_slim/pydantic_ai/embeddings/instrumented.py210 except Exception as e:CODE
LOWpydantic_ai_slim/pydantic_ai/capabilities/hooks.py943 except Exception as new_error:CODE
LOWpydantic_ai_slim/pydantic_ai/capabilities/hooks.py1009 except Exception as new_error:CODE
LOWpydantic_ai_slim/pydantic_ai/capabilities/hooks.py1131 except Exception as new_error:CODE
LOWpydantic_ai_slim/pydantic_ai/capabilities/hooks.py1250 except Exception as new_error:CODE
LOWpydantic_ai_slim/pydantic_ai/capabilities/combined.py389 except Exception as new_error:CODE
LOWpydantic_ai_slim/pydantic_ai/capabilities/combined.py464 except Exception as new_error:CODE
LOWpydantic_ai_slim/pydantic_ai/capabilities/combined.py530 except Exception:CODE
LOWpydantic_ai_slim/pydantic_ai/capabilities/combined.py597 except Exception as new_error:CODE
LOWpydantic_ai_slim/pydantic_ai/capabilities/combined.py659 except Exception: # pragma: no coverCODE
LOWpydantic_ai_slim/pydantic_ai/capabilities/combined.py720 except Exception as new_error:CODE
LOWpydantic_ai_slim/pydantic_ai/models/_continuation.py233 except Exception:CODE
LOWpydantic_ai_slim/pydantic_ai/models/fallback.py262 except Exception as exc:CODE
LOWpydantic_ai_slim/pydantic_ai/models/fallback.py289 except Exception as exc:CODE
LOWpydantic_ai_slim/pydantic_ai/models/fallback.py351 except Exception as exc:CODE
LOWpydantic_ai_slim/pydantic_ai/models/fallback.py383 except Exception as exc:CODE
LOWpydantic_ai_slim/pydantic_ai/realtime/_session.py2506 except Exception as e:CODE
LOWpydantic_ai_slim/pydantic_ai/_cli/web.py98 except Exception as e: # pragma: no coverCODE
MEDIUMpydantic_ai_slim/pydantic_ai/_cli/__init__.py305 console.print(f'Error initializing [magenta]{args.model}[/magenta]:\n[red]{e}[/red]')CODE
LOWpydantic_ai_slim/pydantic_ai/_cli/__init__.py398 except Exception as e: # pragma: no coverCODE
LOWtests/conftest.py1138 except Exception: # pragma: no coverCODE
LOWtests/test_agent.py7682 except Exception as e:STRING
LOWtests/_inline_snapshot.py119 except Exception as e:CODE
LOWtests/models/test_model_settings_support.py266 except Exception:CODE
LOWtests/realtime/test_openai_ws.py529 except Exception:CODE
MEDIUMdocs/agent.md1557 print('An error occurred:', e)CODE
LOWdocs/toolsets.md616 except Exception as e:CODE
LOWdocs/evals/evaluators/overview.md107 except Exception:CODE
LOWdocs/evals/evaluators/custom.md119 except Exception:CODE
LOWdocs/evals/evaluators/custom.md294 except Exception as e:CODE
LOWdocs/evals/evaluators/custom.md524 except Exception as e:CODE
LOWdocs/evals/evaluators/custom.md619 except Exception:CODE
LOWpydantic_evals/pydantic_evals/online.py692 except Exception: # pragma: no coverCODE
LOWpydantic_evals/pydantic_evals/online.py695 except Exception as e:CODE
37 more matches not shown…
Modern Structural Boilerplate64 hits · 61 pts
SeverityFileLineSnippetContext
LOWpydantic_ai_slim/pydantic_ai/retries.py62__all__ = [CODE
LOWpydantic_ai_slim/pydantic_ai/_ssrf.py22__all__ = ['safe_download']CODE
LOWpydantic_ai_slim/pydantic_ai/mcp.py1133 def set_sampling_model(self, model: models.Model) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/template.py13__all__ = ['TemplateStr']CODE
LOWpydantic_ai_slim/pydantic_ai/_utils.py886def _update_mapped_json_schema_refs(s: dict[str, Any], name_mapping: dict[str, str]) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/ui/_adapter.py51__all__ = [CODE
LOWpydantic_ai_slim/pydantic_ai/ui/__init__.py12__all__ = [CODE
LOW…ntic_ai_slim/pydantic_ai/ui/vercel_ai/_event_stream.py85__all__ = ['VercelAIEventStream']CODE
LOWpydantic_ai_slim/pydantic_ai/ui/vercel_ai/_adapter.py115__all__ = ['VercelAIAdapter']CODE
LOWpydantic_ai_slim/pydantic_ai/ui/vercel_ai/__init__.py13__all__ = [CODE
LOWpydantic_ai_slim/pydantic_ai/ui/vercel_ai/_utils.py44__all__ = []CODE
LOWpydantic_ai_slim/pydantic_ai/ui/_web/__init__.py6__all__ = [CODE
LOWpydantic_ai_slim/pydantic_ai/ui/ag_ui/_interrupt.py63__all__ = [CODE
LOWpydantic_ai_slim/pydantic_ai/ui/ag_ui/_event_stream.py83__all__ = [CODE
LOW…dantic_ai_slim/pydantic_ai/ui/ag_ui/_forward_compat.py29__all__ = ['skip_unknown_tagged_items']CODE
LOWpydantic_ai_slim/pydantic_ai/ui/ag_ui/_adapter.py151__all__ = ['AGUIAdapter']CODE
LOWpydantic_ai_slim/pydantic_ai/ui/ag_ui/__init__.py7__all__ = [CODE
LOWpydantic_ai_slim/pydantic_ai/embeddings/__init__.py22__all__ = [CODE
LOWpydantic_ai_slim/pydantic_ai/capabilities/__init__.py100__all__ = [CODE
LOW…antic_ai_slim/pydantic_ai/native_tools/_tool_search.py34__all__ = [CODE
LOWpydantic_ai_slim/pydantic_ai/providers/gateway.py296def _set_google_ws_gateway_auth(client: GoogleClient, api_key: str) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/providers/mistral.py121 def _set_http_client(self, http_client: AsyncHTTPClient) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/providers/sambanova.py27__all__ = ['SambaNovaProvider']CODE
LOW…dantic_ai_slim/pydantic_ai/providers/bedrock_mantle.py224 def _set_http_client(self, http_client: _OpenAIHTTPClient) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/providers/__init__.py107 def _set_http_client(self, http_client: AsyncHTTPClient) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/providers/google.py93 def _set_http_client(self, http_client: AsyncHTTPClient) -> None:CODE
LOW…ic_ai_slim/pydantic_ai/providers/_openai_compatible.py54 def _set_http_client(self, http_client: AsyncHTTPClient) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/providers/groq.py154 def _set_http_client(self, http_client: AsyncHTTPClient) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/providers/anthropic.py173 def _set_http_client(self, http_client: AsyncHTTPClient) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/providers/github.py144 def _set_http_client(self, http_client: AsyncHTTPClient) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/providers/cohere.py91 def _set_http_client(self, http_client: AsyncHTTPClient) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/agent/__init__.py3821 def set_mcp_sampling_model(self, model: models.Model | models.KnownModelName | str | None = None) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/agent/__init__.py3839 def _set_sampling_model(toolset: AbstractToolset[AgentDepsT]) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/agent/spec.py25__all__ = ['CapabilitySpec'] # re-exported from _specCODE
LOWpydantic_ai_slim/pydantic_ai/models/wrapper.py28__all__ = ['WrapperModel']CODE
LOWpydantic_ai_slim/pydantic_ai/models/openai.py4102 def _set_state(self, status: ResponseStatus | None) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/models/xai.py985 def _update_response_state(self, response: chat_types.Response) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/models/_continuation.py50__all__ = [CODE
LOWpydantic_ai_slim/pydantic_ai/models/fallback.py477 def _set_span_attributes(self, model: Model, model_request_parameters: ModelRequestParameters) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/durable_exec/_utils.py27__all__ = [CODE
LOW…_ai_slim/pydantic_ai/durable_exec/temporal/__init__.py35__all__ = [CODE
LOW…ic_ai_slim/pydantic_ai/durable_exec/temporal/_model.py44__all__ = [CODE
LOW…ntic_ai_slim/pydantic_ai/durable_exec/dbos/__init__.py16__all__ = ['DBOSAgent', 'DBOSDurability', 'DBOSModel', 'DBOSParallelExecutionMode', 'StepConfig']CODE
LOW…c_ai_slim/pydantic_ai/durable_exec/prefect/__init__.py17__all__ = [CODE
LOW…antic_ai_slim/pydantic_ai/realtime/_instrumentation.py354 def set_output_type(self, output_type: Literal['speech', 'text']) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/realtime/openai.py408 def set_message_history(self, message_history: Callable[[], Sequence[ModelMessage]]) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/realtime/xai.py293 def set_message_history(self, message_history: Callable[[], Sequence[ModelMessage]]) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/realtime/codec.py417 def set_message_history(self, message_history: Callable[[], Sequence[ModelMessage]]) -> None:CODE
LOWpydantic_ai_slim/pydantic_ai/profiles/__init__.py15__all__ = [CODE
LOWtests/test_function_signature.py1437 def set_color(color: _Color) -> None:STRING
LOWtests/test_function_signature.py1442def set_color(*, color: Literal['red', 'green']) -> None:STRING
LOWtests/mcp_server.py371async def set_logging_level(level: str) -> None:CODE
LOWtests/graph/builder/test_graph_builder.py228 async def set_counter(ctx: StepContext[SimpleState, None, None]) -> None:CODE
LOWtests/graph/builder/test_graph_builder.py232 async def set_result(ctx: StepContext[SimpleState, None, None]) -> None:CODE
LOWtests/durable_exec/temporal/test_agent.py2148 def set_deferred_tool_results(self, results: DeferredToolResults) -> None:CODE
LOWtests/v2/test_google_history_replay.py33def _set_google_api_key(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/realtime/test_openai.py3509async def _settle() -> None:CODE
LOWtests/realtime/test_session.py3498 def set_message_history(self, message_history: Callable[[], Sequence[ModelMessage]]) -> None:CODE
LOWpydantic_evals/pydantic_evals/_otel_emit.py218def _set_score_attrs(attrs: dict[str, Any], value: Any) -> None:CODE
LOWpydantic_evals/pydantic_evals/dataset.py1263def set_eval_attribute(name: str, value: Any) -> None:CODE
4 more matches not shown…
Redundant / Tautological Comments34 hits · 52 pts
SeverityFileLineSnippetContext
LOWpydantic_ai_slim/pydantic_ai/_ssrf.py422 # Check if hostname is already an IP addressCOMMENT
LOWpydantic_ai_slim/pydantic_ai/_ssrf.py467 # Check if it's an absolute URL (has scheme) or protocol-relative URL (has netloc but no scheme)COMMENT
LOWpydantic_ai_slim/pydantic_ai/_ssrf.py678 # Check if we need to follow a redirectCOMMENT
LOWpydantic_ai_slim/pydantic_ai/function_signature.py712 # Check if this is object with properties + nullCOMMENT
LOWpydantic_ai_slim/pydantic_ai/mcp.py1900 # Check if variable exists in environmentCOMMENT
LOWpydantic_ai_slim/pydantic_ai/providers/litellm.py72 # Check if model name contains a provider prefix (e.g., "anthropic/claude-3")COMMENT
LOWpydantic_ai_slim/pydantic_ai/models/__init__.py663 # Check if output mode is supportedCOMMENT
LOWpydantic_ai_slim/pydantic_ai/models/openai.py1541 # Check if thinking came from a custom field from the same providerCOMMENT
LOW…ic_ai_slim/pydantic_ai/durable_exec/temporal/_model.py304 # Check if this model instance is already registeredCOMMENT
LOW…tic_ai_slim/pydantic_ai/durable_exec/prefect/_model.py134 # Check if we're in a flow contextCOMMENT
LOWpydantic_ai_slim/pydantic_ai/_cli/__init__.py147 # Check if this is a web command - route to web parser if soCOMMENT
LOWpydantic_ai_slim/pydantic_ai/profiles/openai.py369 # Check if the model supports web search (only specific search-preview models)COMMENT
LOWtests/capability_models.py47 # Check if there's already a tool return in messages (i.e., tool was called)COMMENT
LOWtests/test_uuid.py48 # Set counter to max so the next same-ms call overflowsCOMMENT
LOWtests/evals/test_evaluators.py229 # Check if the answer is correct based on expected outputCOMMENT
LOWtests/evals/test_llm_as_a_judge.py210 # Check if 'model' kwarg is passed, its value will be the default model or NoneCOMMENT
LOWtests/evals/test_llm_as_a_judge.py331 # Check if 'model' kwarg is passed, its value will be the default model or NoneCOMMENT
LOWtests/evals/test_llm_as_a_judge.py441 # Check if 'model' kwarg is passed, its value will be the default model or NoneCOMMENT
LOWtests/evals/test_llm_as_a_judge.py477 # Check if 'model' kwarg is passed, its value will be the default model or NoneCOMMENT
LOWtests/evals/test_llm_as_a_judge.py599 # Check if 'model' kwarg is passed, its value will be the default model or NoneCOMMENT
LOWtests/evals/test_llm_as_a_judge.py630 # Check if 'model' kwarg is passed, its value will be the default model or NoneCOMMENT
LOWtests/graph/builder/test_graph_iteration.py455 # Check if we're about to execute step2COMMENT
LOWtests/models/test_openai.py5935 # Set profile to use URI encodingCOMMENT
LOWtests/models/test_openai.py5991 # Set profile to use URI encodingCOMMENT
LOWtests/durable_exec/temporal/test_durability.py321 # Check if we already have a tool resultCOMMENT
LOWpydantic_evals/pydantic_evals/evaluators/evaluator.py93 # Check if value matches any of the target types, handling bool as a special caseCOMMENT
LOW.github/workflows/pr-guard.yml357 # Check if the existing PR has the Stale labelCOMMENT
LOWpydantic_graph/pydantic_graph/graph_builder.py771 # Check if this join has any intermediate joins that are also active reducersCOMMENT
LOWpydantic_graph/pydantic_graph/graph_builder.py779 # Check if the intermediate join is also an active reducer with matching fork runCOMMENT
LOWpydantic_graph/pydantic_graph/graph_builder.py782 # Check if they share the same fork run for this join's parent forkCOMMENT
LOWpydantic_graph/pydantic_graph/graph_builder.py234 # Check if this join appears in any other join's intermediate_join_nodesCOMMENT
LOWpydantic_graph/pydantic_graph/graph_builder.py1085 # Check if any of the tasks in the graph have this fork_run_id in their fork_stackCOMMENT
LOWpydantic_graph/pydantic_graph/graph_builder.py1817 # Check if this node has any outgoing edgesCOMMENT
LOWpydantic_graph/pydantic_graph/graph_builder.py2052 # Check if this intermediate node is also a joinCOMMENT
Slop Phrases12 hits · 28 pts
SeverityFileLineSnippetContext
MEDIUMtests/typed_deps.py41# Ensure that you can use tools with deps that are supertypes of the agent's depsCOMMENT
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 LonCODE
MEDIUMtests/models/test_groq.py788It's worth noting that the weather in San Francisco can be quite variable, and the temperature can drop significantly atCODE
MEDIUMtests/models/test_groq.py1031It's worth noting that the weather in San Francisco can be quite variable, and the temperature can drop significantly atCODE
MEDIUM…_matrix[tool_return_content-url-document-xai].xai.yaml125 The content appears to be purely for demonstration purposes and lacksCODE
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 reCODE
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, testingCODE
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 CODE
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 siCODE
MEDIUM…turn_content-url_force_download-document-mistral].yaml539 This PDF appears to be a template or test file, likely used for demonstration purposes.CODE
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 FrancCODE
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 diCODE
Structural Annotation Overuse10 hits · 20 pts
SeverityFileLineSnippetContext
LOWpydantic_ai_slim/pydantic_ai/models/__init__.py896 # Step 4: native tools intersection — profile's allowed tools & model's implemented toolsCOMMENT
LOWpydantic_ai_slim/pydantic_ai/models/__init__.py884 # Step 3: user overrideCOMMENT
LOWtests/test_toolsets.py461 # Step 1: Prefix each FunctionToolset individuallyCOMMENT
LOWtests/test_toolsets.py466 # Step 2: Combine the prefixed toolsetsCOMMENT
LOWtests/test_toolsets.py469 # Step 3: Filter tools based on user role and advanced flag, now using prefixed namesCOMMENT
LOWtests/test_toolsets.py481 # Step 4: Apply prepared toolset to modify descriptions (add user role annotation)COMMENT
LOWtests/test_toolsets.py489 # Step 5: Test the fully composed toolsetCOMMENT
LOW.claude/skills/testing-skill/SKILL.md25### Step 1: Record cassettesCOMMENT
LOW.claude/skills/testing-skill/SKILL.md36### Step 2: Verify recordingsCOMMENT
LOW.claude/skills/testing-skill/SKILL.md43### Step 3: Review snapshotsCOMMENT
Overly Generic Function Names20 hits · 18 pts
SeverityFileLineSnippetContext
LOWpydantic_ai_slim/pydantic_ai/retries.py195 def handle_request(self, request: httpx2.Request) -> httpx2.Response:CODE
LOWpydantic_ai_slim/pydantic_ai/retries.py210 def handle_request(req: httpx2.Request) -> httpx2.Response:CODE
LOWpydantic_ai_slim/pydantic_ai/retries.py381 def handle_request(self, request: Request) -> Response:CODE
LOWpydantic_ai_slim/pydantic_ai/retries.py396 def handle_request(req: Request) -> Response:CODE
LOWtests/test_ui.py2247 def do_something(x: int) -> int:CODE
LOWtests/test_ssrf.py1102 def handle_request(request: httpx2.Request) -> httpx2.Response:CODE
LOWtests/test_ssrf.py1120 def handle_request(request: httpx2.Request) -> httpx2.Response:CODE
LOWtests/test_ssrf.py636 def handle_request(request: httpx2.Request) -> httpx2.Response:CODE
LOWtests/test_ssrf.py724 def handle_request(request: httpx2.Request) -> httpx2.Response:CODE
LOWtests/test_ssrf.py959 def handle_request(request: httpx2.Request) -> httpx2.Response:CODE
LOWtests/test_ssrf.py1158 def handle_request(request: httpx2.Request) -> httpx2.Response:CODE
LOWtests/typed_agent.py268 def my_method(self) -> bool:CODE
LOWtests/test_tools.py4733 def do_stuff(x: int) -> None:CODE
LOWtests/test_tools.py4743 def do_stuff(x: int):CODE
LOWtests/graph/builder/test_util.py35 def my_function():CODE
LOWtests/models/test_download_item.py66 def handle_request(request: httpx2.Request) -> httpx2.Response:CODE
LOWtests/models/test_xai.py1028 async def process_data(data: str) -> str:CODE
LOWpydantic_evals/pydantic_evals/online.py22async def my_function(x: int) -> int:STRING
LOWpydantic_evals/pydantic_evals/online.py890 async def my_function(x: int) -> int:STRING
LOWpydantic_evals/pydantic_evals/_task_run.py36def run_task() -> Generator[Callable[[], dict[str, Any]]]:CODE
Verbosity Indicators7 hits · 15 pts
SeverityFileLineSnippetContext
LOWpydantic_ai_slim/pydantic_ai/models/__init__.py896 # Step 4: native tools intersection — profile's allowed tools & model's implemented toolsCOMMENT
LOWpydantic_ai_slim/pydantic_ai/models/__init__.py884 # Step 3: user overrideCOMMENT
LOWtests/test_toolsets.py461 # Step 1: Prefix each FunctionToolset individuallyCOMMENT
LOWtests/test_toolsets.py466 # Step 2: Combine the prefixed toolsetsCOMMENT
LOWtests/test_toolsets.py469 # Step 3: Filter tools based on user role and advanced flag, now using prefixed namesCOMMENT
LOWtests/test_toolsets.py481 # Step 4: Apply prepared toolset to modify descriptions (add user role annotation)COMMENT
LOWtests/test_toolsets.py489 # Step 5: Test the fully composed toolsetCOMMENT
AI Response Leakage1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHpydantic_evals/pydantic_evals/dataset.py1190 # However, I've added this because it affects the details of the otel span, and passing `escaped=True`COMMENT