AI Slop Code RIsk Monitor

openai/openai-python

The official Python library for the OpenAI API

170.4 High pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for openai/openai-python, a Python project with 31,796 GitHub stars. SynthScan examined 329,897 lines of code across 2356 source files, recording 16784 pattern matches distributed across 19 syntactic categories. The legacy adjusted pattern signal is 170.4 (High pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

170.4
Adjusted Signal
170.4
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
31.8K
Stars
Python
Language
329.9K
Lines of Code
2.4K
Files
16.8K
Pattern Hits
2026-10-12
Scan Date
3.23
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 35.3/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 3244 finding(s).

Hallucinated Dependency & Supply Chain Risk 96.3/100 · CRITICAL

Are imports declared and package/API names verified? 5703 finding(s).

Agent Over-Engineering Ratio 99.4/100 · CRITICAL

Are wrappers, guards, and repeated structures necessary? 10862 finding(s).

PR Review Velocity Impact 100.0/100 · CRITICAL

Which changes need focused human review? 16784 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 1605HIGH 6015MEDIUM 27LOW 9137

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 16784 distinct pattern matches across 19 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Cross-File Repetition5908 hits · 29540 pts
SeverityFileLineSnippetContext
HIGHsrc/openai/_response.py0close the response and release the connection. automatically called if the response body is read to completion.STRING
HIGHsrc/openai/_streaming.py0close the response and release the connection. automatically called if the response body is read to completion.STRING
HIGHsrc/openai/lib/streaming/chat/_completions.py0close the response and release the connection. automatically called if the response body is read to completion.STRING
HIGHsrc/openai/lib/streaming/responses/_responses.py0close the response and release the connection. automatically called if the response body is read to completion.STRING
HIGHsrc/openai/_client.py0use uploads to upload large files in multiple parts.STRING
HIGHsrc/openai/resources/uploads/parts.py0use uploads to upload large files in multiple parts.STRING
HIGHsrc/openai/resources/uploads/uploads.py0use uploads to upload large files in multiple parts.STRING
HIGHsrc/openai/types/video_create_error.py0an optional classification; clients must accept additional values.STRING
HIGHsrc/openai/types/beta/beta_response_error.py0an optional classification; clients must accept additional values.STRING
HIGHsrc/openai/types/beta/beta_responses_server_event.py0an optional classification; clients must accept additional values.STRING
HIGHsrc/openai/types/responses/responses_server_event.py0an optional classification; clients must accept additional values.STRING
HIGHsrc/openai/types/responses/response_error.py0an optional classification; clients must accept additional values.STRING
HIGHsrc/openai/types/shared/error_object.py0an optional classification; clients must accept additional values.STRING
HIGHsrc/openai/types/video_create_error.py0an opaque target for explicitly continuing this review, or null when unavailable.STRING
HIGHsrc/openai/types/beta/beta_response_error.py0an opaque target for explicitly continuing this review, or null when unavailable.STRING
HIGHsrc/openai/types/beta/beta_responses_server_event.py0an opaque target for explicitly continuing this review, or null when unavailable.STRING
HIGHsrc/openai/types/responses/responses_server_event.py0an opaque target for explicitly continuing this review, or null when unavailable.STRING
HIGHsrc/openai/types/responses/response_error.py0an opaque target for explicitly continuing this review, or null when unavailable.STRING
HIGHsrc/openai/types/shared/error_object.py0an opaque target for explicitly continuing this review, or null when unavailable.STRING
HIGHsrc/openai/types/eval_retrieve_response.py0a logsdatasourceconfig which specifies the metadata property of your logs query. this is usually metadata like `usecase=STRING
HIGHsrc/openai/types/eval_list_response.py0a logsdatasourceconfig which specifies the metadata property of your logs query. this is usually metadata like `usecase=STRING
HIGHsrc/openai/types/eval_update_response.py0a logsdatasourceconfig which specifies the metadata property of your logs query. this is usually metadata like `usecase=STRING
HIGHsrc/openai/types/eval_create_response.py0a logsdatasourceconfig which specifies the metadata property of your logs query. this is usually metadata like `usecase=STRING
HIGHsrc/openai/types/eval_retrieve_response.py0the json schema for the run data source items. learn how to build json schemas [here](https://json-schema.org/).STRING
HIGHsrc/openai/types/eval_list_response.py0the json schema for the run data source items. learn how to build json schemas [here](https://json-schema.org/).STRING
HIGHsrc/openai/types/eval_update_response.py0the json schema for the run data source items. learn how to build json schemas [here](https://json-schema.org/).STRING
HIGHsrc/openai/types/eval_custom_data_source_config.py0the json schema for the run data source items. learn how to build json schemas [here](https://json-schema.org/).STRING
HIGHsrc/openai/types/eval_create_response.py0the json schema for the run data source items. learn how to build json schemas [here](https://json-schema.org/).STRING
HIGH…ai/types/eval_stored_completions_data_source_config.py0the json schema for the run data source items. learn how to build json schemas [here](https://json-schema.org/).STRING
HIGHsrc/openai/types/eval_retrieve_response.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/vector_store_create_params.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/batch_create_params.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/eval_update_params.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/vector_store.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/eval_create_params.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/batch.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/vector_store_update_params.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/eval_list_response.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/eval_update_response.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/eval_create_response.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGH…ai/types/eval_stored_completions_data_source_config.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/beta/thread.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/beta/thread_update_params.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/beta/thread_create_params.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/beta/assistant.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/beta/beta_responses_client_event.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGH…openai/types/beta/beta_responses_client_event_param.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/beta/response_create_params.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/beta/assistant_create_params.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/beta/beta_response.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/beta/assistant_update_params.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/beta/thread_create_and_run_params.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/beta/realtime/realtime_response.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGH…nai/types/beta/realtime/response_create_event_param.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/beta/realtime/response_create_event.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/beta/threads/run.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/beta/threads/message_update_params.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/beta/threads/run_create_params.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/beta/threads/run_update_params.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
HIGHsrc/openai/types/beta/threads/message.py0set of 16 key-value pairs that can be attached to an object. this can be useful for storing additional information aboutSTRING
5848 more matches not shown…
Hallucination Indicators1605 hits · 18195 pts
SeverityFileLineSnippetContext
CRITICALhelpers.md706prepared = client.beta.agents.environments.files.prepare({CODE
CRITICALhelpers.md718artifacts = client.beta.agents.sessions.artifacts.for_result(result)CODE
CRITICALtests/test_agent_session_environment_reset.py49 with client.beta.agents.sessions.events.stream("session_synthetic") as stream:CODE
CRITICALtests/test_agent_session_environment_reset.py60 async with await async_client.beta.agents.sessions.events.stream("session_synthetic") as async_stream:CODE
CRITICALtests/test_agent_session_environment_reset.py117 with client.beta.agents.sessions.events.stream("session_synthetic") as stream:CODE
CRITICALtests/test_agent_session_environment_reset.py128 async with await async_client.beta.agents.sessions.events.stream("session_synthetic") as async_stream:CODE
CRITICALtests/test_agents_environment_token_page.py53 page = client.beta.agents.environments.files.list(CODE
CRITICALtests/test_agents_environment_token_page.py73 page = await client.beta.agents.environments.files.list(CODE
CRITICAL⚡tests/test_agent_session_update.py36 client.beta.agents.sessions.with_raw_response.update("session_test", **body)CODE
CRITICAL⚡tests/test_agent_session_update.py53 await async_client.beta.agents.sessions.with_raw_response.update("session_test", **body)CODE
CRITICALtests/test_environment_credentials.py94 credential = client.beta.agents.vaults.credentials.create(CODE
CRITICALtests/test_environment_credentials.py107 credential = await async_client.beta.agents.vaults.credentials.create(CODE
CRITICALtests/test_environment_credentials.py149 credential = client.beta.agents.vaults.credentials.update(CODE
CRITICALtests/test_environment_credentials.py162 credential = await async_client.beta.agents.vaults.credentials.update(CODE
CRITICALtests/test_environment_credentials.py205 credential = client.beta.agents.vaults.credentials.create(CODE
CRITICALtests/test_environment_credentials.py216 credential = await async_client.beta.agents.vaults.credentials.create(CODE
CRITICAL⚡tests/test_agent_turn_items_pagination.py54 client.beta.agents.sessions.turns.items.list("turn_test", session_id="session_test", order="asc", limit=1)CODE
CRITICAL⚡tests/test_agent_turn_items_pagination.py71 page = await client.beta.agents.sessions.turns.items.list(CODE
CRITICALtests/test_vault_metadata_filters.py21 client.beta.agents.vaults.credentials.list("vault_test", metadata={"state": ""})CODE
CRITICALtests/test_vault_metadata_filters.py44 await client.beta.agents.vaults.credentials.list("vault_test", metadata={"state": ""})CODE
CRITICAL⚡tests/lib/test_fine_tuning_positional_arguments.py35 response = client.fine_tuning.jobs.checkpoints.with_raw_response.list(CODE
CRITICAL⚡tests/lib/test_fine_tuning_positional_arguments.py46 with client.fine_tuning.jobs.checkpoints.with_streaming_response.list(CODE
CRITICALtests/lib/test_fine_tuning_positional_arguments.py60 client.fine_tuning.jobs.checkpoints.with_raw_response.list(CODE
CRITICAL⚡tests/lib/test_fine_tuning_positional_arguments.py88 response = await async_client.fine_tuning.jobs.checkpoints.with_raw_response.list(CODE
CRITICAL⚡tests/lib/test_fine_tuning_positional_arguments.py99 async with async_client.fine_tuning.jobs.checkpoints.with_streaming_response.list(CODE
CRITICALtests/lib/test_fine_tuning_positional_arguments.py113 await async_client.fine_tuning.jobs.checkpoints.with_raw_response.list(CODE
CRITICAL⚡tests/lib/streaming/agents/test_creation_tools.py182 async with sdk.beta.agents.sessions.with_streaming_response.create(CODE
CRITICAL⚡tests/lib/streaming/agents/test_creation_tools.py192 with sdk.beta.agents.sessions.with_streaming_response.create(CODE
CRITICAL⚡tests/lib/streaming/agents/test_artifacts.py90 return await sdk.beta.agents.sessions.artifacts.for_result(result()).download(CODE
CRITICAL⚡tests/lib/streaming/agents/test_artifacts.py98 return sdk.beta.agents.sessions.artifacts.for_result(result()).download(CODE
CRITICAL⚡tests/lib/streaming/agents/test_artifacts.py143 await sdk.beta.agents.sessions.artifacts.for_result(result()).content("/workspace/outputs/report.md", **options)CODE
CRITICAL⚡tests/lib/streaming/agents/test_artifacts.py145 else sdk.beta.agents.sessions.artifacts.for_result(result()).content("/workspace/outputs/report.md", **options)CODE
CRITICAL⚡tests/lib/streaming/agents/test_artifacts.py163 await sdk.beta.agents.sessions.artifacts.for_result(result()).content("/workspace/outputs/report.md")CODE
CRITICAL⚡tests/lib/streaming/agents/test_artifacts.py165 sdk.beta.agents.sessions.artifacts.for_result(result()).content("/workspace/outputs/report.md")CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py77 return await sdk.beta.agents.environments.files.prepare(files, **options)CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py78 return sdk.beta.agents.environments.files.prepare(files, **options)CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py163 result = await sdk.beta.agents.environments.files.prepare_directory(CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py167 result = sdk.beta.agents.environments.files.prepare_directory(CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py175 await sdk.beta.agents.environments.files.prepare_directory(CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py179 sdk.beta.agents.environments.files.prepare_directory(CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py188 return await sdk.beta.agents.environments.files.upload(CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py195 return sdk.beta.agents.environments.files.upload(CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py244 await sdk.beta.agents.environments.files.prepare({"/workspace/a": source, "/workspace/b": source})CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py291 await sdk.beta.agents.environments.files.upload(CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py312 prepared = await sdk.beta.agents.environments.files.prepare_directory(CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py316 prepared = sdk.beta.agents.environments.files.prepare_directory(CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py389 await sdk.beta.agents.environments.files.upload(CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py393 sdk.beta.agents.environments.files.upload("env_test", file=("large", content), path="/workspace/large")CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py401 await sdk.beta.agents.environments.files.upload(CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py405 sdk.beta.agents.environments.files.upload("", file=("source.txt", b"abc"), path="/workspace/source.txt")CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py474 prepared = await sdk.beta.agents.environments.files.prepare_directory(CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py482 return await sdk.beta.agents.environments.files.prepare_directory(CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py485 return sdk.beta.agents.environments.files.prepare_directory(root, destination=destination, include=["**/*.txt"])CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py509 result = await sdk.beta.agents.environments.files.prepare_directory(CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py513 result = sdk.beta.agents.environments.files.prepare_directory(CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py536 result = await sdk.beta.agents.environments.files.prepare_directory(CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py540 result = sdk.beta.agents.environments.files.prepare_directory(CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py600 prepared = await sdk.beta.agents.environments.files.prepare_directory(CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py604 prepared = sdk.beta.agents.environments.files.prepare_directory(CODE
CRITICAL⚡tests/lib/streaming/agents/test_files.py632 await sdk.beta.agents.environments.files.prepare({"/workspace/source.txt": source})CODE
1545 more matches not shown…
Unused Imports3982 hits · 3163 pts
SeverityFileLineSnippetContext
LOWtests/test_x509_host_authority.py1CODE
LOWtests/test_agent_session_environment_reset.py1CODE
LOWtests/test_httpx_compat.py1CODE
LOWtests/test_data_residency_regressions.py1CODE
LOWtests/test_safety_cases.py1CODE
LOWtests/test_dependency_constraints.py1CODE
LOWtests/test_lazy_imports.py1CODE
LOWtests/test_x509_security_boundaries.py1CODE
LOWtests/conftest.py1CODE
LOWtests/test_module_client.py1CODE
LOWtests/test_transform.py1CODE
LOWtests/test_send_queue_reconnect.py1CODE
LOWtests/test_x509_workload_identity.py1CODE
LOWtests/test_large_payload_contract.py1CODE
LOWtests/test_httpx2.py1CODE
LOWtests/test_x509_workload_identity_regressions.py1CODE
LOWtests/test_tls_hostname.py1CODE
LOWtests/test_httpx2_workload.py1CODE
LOWtests/test_sse_framing.py1CODE
LOWtests/test_request_body_routing_order.py1CODE
LOWtests/test_debug_logging.py1CODE
LOWtests/test_streaming.py1CODE
LOWtests/test_mtls_http_client.py1CODE
LOWtests/test_log_levels.py1CODE
LOWtests/test_x509_workload_identity_transport.py1CODE
LOWtests/test_external_storage.py1CODE
LOWtests/test_external_storage.py11CODE
LOWtests/test_retry_after_overflow.py1CODE
LOWtests/test_upload_examples.py1CODE
LOWtests/test_agent_session_update.py1CODE
LOWtests/test_httpx2_respx.py1CODE
LOWtests/utils.py1CODE
LOWtests/test_send_queue.py1CODE
LOWtests/test_environment_credentials.py1CODE
LOWtests/test_x509_workload_identity_hardening.py1CODE
LOWtests/test_required_args.py1CODE
LOWtests/test_httpx2_base.py1CODE
LOWtests/test_platform.py1CODE
LOWtests/test_breaking_change_reexports.py1CODE
LOWtests/test_uv_workflows.py1CODE
LOWtests/test_client.py1CODE
LOWtests/test_client.py41CODE
LOWtests/test_data_residency_contract.py3CODE
LOWtests/test_extract_files.py1CODE
LOWtests/test_readme_metadata.py1CODE
LOWtests/test_multipart_encoding.py3CODE
LOWtests/test_httpx2_decompression.py1CODE
LOWtests/test_utils/test_typing.py1CODE
LOWtests/test_utils/test_json.py1CODE
LOWtests/test_utils/test_path.py1CODE
LOWtests/lib/test_file_processing.py1CODE
LOWtests/lib/test_websocket_urls.py1CODE
LOWtests/lib/test_realtime_websocket_recovery.py1CODE
LOWtests/lib/snapshots.py1CODE
LOWtests/lib/test_bedrock_auth_conformance.py1CODE
LOWtests/lib/test_vector_store_polling.py1CODE
LOWtests/lib/test_pydantic.py1CODE
LOWtests/lib/test_audio.py1CODE
LOWtests/lib/test_bedrock_runtime.py1CODE
LOWtests/lib/test_realtime_calls.py1CODE
3922 more matches not shown…
Hyper-Verbose Identifiers2699 hits · 2365 pts
SeverityFileLineSnippetContext
LOWhelpers.md499def current_run_step_snapshot() -> RunStep | NoneCODE
LOWtests/test_agent_session_environment_reset.py20async def test_session_environment_reset_stream(CODE
LOWtests/test_agent_session_environment_reset.py79async def test_session_environment_lifecycle_stream(sync: bool, strict: bool) -> None:CODE
LOWtests/test_httpx_compat.py20def test_external_legacy_httpx_client_is_supported() -> None:CODE
LOWtests/test_httpx_compat.py38async def test_external_legacy_async_httpx_client_is_supported() -> None:CODE
LOWtests/test_httpx_compat.py56async def test_external_legacy_aiohttp_client_is_supported() -> None:CODE
LOWtests/test_data_residency_regressions.py33def test_provider_conflicts_and_explicit_switch(client_type: type[OpenAI] | type[AsyncOpenAI]) -> None:CODE
LOWtests/test_data_residency_regressions.py51def test_legacy_azure_rejects_residency(client_type: type[AzureOpenAI] | type[AsyncAzureOpenAI]) -> None:CODE
LOWtests/test_data_residency_regressions.py59def test_legacy_bedrock_rejects_residency(client_type: type[BedrockOpenAI] | type[AsyncBedrockOpenAI]) -> None:CODE
LOW⚡tests/test_data_residency_regressions.py74def test_sync_request_only_changes_destination() -> None:CODE
LOW⚡tests/test_data_residency_regressions.py82async def test_async_request_only_changes_destination() -> None:CODE
LOW⚡tests/test_data_residency_regressions.py92def test_residency_replaces_inherited_websocket_routing(CODE
LOWtests/test_safety_cases.py50def test_sync_safety_case_contract(notice_type: str, reason: str | None) -> None:CODE
LOWtests/test_safety_cases.py74async def test_async_safety_case_contract(notice_type: str, reason: str | None) -> None:CODE
LOWtests/test_safety_cases.py95def test_safety_case_future_notice_is_preserved_by_default() -> None:CODE
LOWtests/test_safety_cases.py111def test_sync_safety_case_never_uses_admin_key_as_fallback(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/test_safety_cases.py128async def test_async_safety_case_never_uses_admin_key_as_fallback(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/test_dependency_constraints.py16def test_optional_network_dependency_security_floors(name: str, extra: str, affected: str, patched: str) -> None:CODE
LOWtests/test_lazy_imports.py56def test_import_does_not_load_assistants(statement: str) -> None:CODE
LOWtests/test_lazy_imports.py67def test_resource_packages_load_only_accessed_exports() -> None:STRING
LOWtests/test_lazy_imports.py91def test_lazy_exports_preserve_public_import_contracts() -> None:STRING
LOWtests/test_lazy_imports.py144def test_first_requests_and_streams_do_not_load_assistants(asynchronous: bool) -> None:STRING
LOWtests/test_lazy_imports.py214def test_concurrent_first_access_preserves_class_identity(asynchronous: bool) -> None:STRING
LOWtests/test_agents_environment_token_page.py45def test_sync_files_token_pagination() -> None:CODE
LOWtests/test_agents_environment_token_page.py65async def test_async_files_token_pagination() -> None:CODE
LOWtests/test_x509_security_boundaries.py222def test_api_key_clients_keep_supported_plaintext_local_origins(client_type: type[OpenAI] | type[AsyncOpenAI]) -> None:CODE
LOWtests/conftest.py26def pytest_collection_modifyitems(items: list[pytest.Function]) -> None:CODE
LOWtests/test_module_client.py72def test_default_headers_option() -> None:CODE
LOWtests/test_module_client.py81def test_default_query_option() -> None:CODE
LOWtests/test_module_client.py122def test_only_api_key_results_in_openai_api() -> None:CODE
LOWtests/test_module_client.py130def test_azure_api_key_env_without_api_version() -> None:CODE
LOWtests/test_module_client.py142def test_azure_api_key_and_version_env() -> None:CODE
LOWtests/test_module_client.py155def test_azure_api_key_version_and_endpoint_env() -> None:CODE
LOWtests/test_module_client.py167def test_azure_azure_ad_token_version_and_endpoint_env() -> None:CODE
LOWtests/test_module_client.py179def test_azure_azure_ad_token_provider_version_and_endpoint_env() -> None:CODE
LOWtests/test_module_client.py194def test_azure_module_explicit_auth_precedence(forced: bool, mode: str) -> None:CODE
LOWtests/test_module_client.py231def test_azure_module_rejects_conflicting_explicit_auth(forced: bool) -> None:CODE
LOWtests/test_module_client.py242def test_azure_module_import_does_not_make_ambient_token_explicit() -> None:CODE
LOWtests/test_module_client.py268def test_azure_module_preserves_provider_ambiguity() -> None:CODE
LOWtests/test_module_client.py277def test_bedrock_token_and_region_env() -> None:CODE
LOWtests/test_module_client.py288def test_bedrock_api_type_env() -> None:CODE
LOWtests/test_module_client.py300def test_bedrock_api_type_uses_bedrock_credentials() -> None:CODE
LOWtests/test_module_client.py313def test_bedrock_api_type_uses_explicit_module_api_key() -> None:CODE
LOWtests/test_module_client.py326def test_bedrock_module_api_key_overrides_cached_env_token_after_load() -> None:CODE
LOWtests/test_module_client.py341def test_bedrock_module_api_key_switches_cached_aws_client_to_bearer() -> None:CODE
LOWtests/test_module_client.py365def test_bedrock_api_type_uses_token_provider_without_mutating_module_api_key() -> None:CODE
LOWtests/test_module_client.py377def test_bedrock_module_api_key_overrides_cached_token_provider() -> None:CODE
LOWtests/test_transform.py141async def test_includes_unknown_keys(use_async: bool) -> None:CODE
LOWtests/test_transform.py159async def test_ignores_invalid_input(use_async: bool) -> None:CODE
LOWtests/test_transform.py251async def test_datetime_custom_format(use_async: bool) -> None:CODE
LOW⚡tests/test_transform.py277async def test_pydantic_model_to_dictionary(use_async: bool) -> None:CODE
LOW⚡tests/test_transform.py284async def test_pydantic_empty_model(use_async: bool) -> None:CODE
LOW⚡tests/test_transform.py290async def test_pydantic_unknown_field(use_async: bool) -> None:CODE
LOW⚡tests/test_transform.py298async def test_pydantic_mismatched_types(use_async: bool) -> None:CODE
LOWtests/test_transform.py310async def test_pydantic_mismatched_object_type(use_async: bool) -> None:CODE
LOWtests/test_transform.py326async def test_pydantic_nested_objects(use_async: bool) -> None:CODE
LOWtests/test_transform.py340async def test_pydantic_default_field(use_async: bool) -> None:CODE
LOWtests/test_transform.py369async def test_pydantic_model_api_exclude(use_async: bool) -> None:CODE
LOWtests/test_transform.py389async def test_iterable_of_dictionaries(use_async: bool) -> None:CODE
LOWtests/test_transform.py417async def test_bare_dict_annotation(use_async: bool) -> None:CODE
2639 more matches not shown…
Modern Structural Boilerplate1788 hits · 1788 pts
SeverityFileLineSnippetContext
LOWtests/respx2/__init__.py29__all__ = [CODE
LOWtests/respx2/mocks.py18__all__ = ["Mocker", "HTTPCoreMocker"]CODE
LOW⚡src/openai/_httpx2.py127def _set_httpx2_defaults(kwargs: dict[str, Any]) -> None:CODE
LOWsrc/openai/__init__.py46__all__ = [CODE
LOWsrc/openai/_client.py112__all__ = ["Timeout", "Transport", "ProxiesTypes", "RequestOptions", "OpenAI", "AsyncOpenAI", "Client", "AsyncClient"]CODE
LOWsrc/openai/_models.py96__all__ = ["BaseModel", "GenericModel"]CODE
LOWsrc/openai/_models.py847def set_pydantic_config(typ: Any, config: pydantic.ConfigDict) -> None:CODE
LOWsrc/openai/pagination.py6__all__ = [CODE
LOWsrc/openai/_exceptions.py15__all__ = [CODE
LOWsrc/openai/types/other_file_chunking_strategy_object.py7__all__ = ["OtherFileChunkingStrategyObject"]CODE
LOWsrc/openai/types/upload_complete_params.py9__all__ = ["UploadCompleteParams"]CODE
LOWsrc/openai/types/skill.py7__all__ = ["Skill"]CODE
LOWsrc/openai/types/video_create_error.py8__all__ = ["VideoCreateError", "Misalignment", "MisalignmentSteer"]CODE
LOWsrc/openai/types/file_purpose.py5__all__ = ["FilePurpose"]CODE
LOWsrc/openai/types/eval_retrieve_response.py19__all__ = [CODE
LOWsrc/openai/types/image_model.py5__all__ = ["ImageModel"]CODE
LOWsrc/openai/types/vector_store_search_params.py12__all__ = ["VectorStoreSearchParams", "Filters", "RankingOptions"]CODE
LOWsrc/openai/types/batch_usage.py5__all__ = ["BatchUsage", "InputTokensDetails", "OutputTokensDetails"]CODE
LOWsrc/openai/types/model_deleted.py5__all__ = ["ModelDeleted"]CODE
LOWsrc/openai/types/container_create_params.py14__all__ = ["ContainerCreateParams", "ExpiresAfter", "NetworkPolicy", "Skill"]CODE
LOWsrc/openai/types/moderation_text_input_param.py7__all__ = ["ModerationTextInputParam"]CODE
LOWsrc/openai/types/vector_store_create_params.py12__all__ = ["VectorStoreCreateParams", "ExpiresAfter"]CODE
LOWsrc/openai/types/batch_create_params.py10__all__ = ["BatchCreateParams", "OutputExpiresAfter"]CODE
LOWsrc/openai/types/video_size.py5__all__ = ["VideoSize"]CODE
LOWsrc/openai/types/eval_list_params.py7__all__ = ["EvalListParams"]CODE
LOWsrc/openai/types/skill_update_params.py7__all__ = ["SkillUpdateParams"]CODE
LOWsrc/openai/types/moderation_create_params.py12__all__ = ["ModerationCreateParams"]CODE
LOWsrc/openai/types/eval_update_params.py10__all__ = ["EvalUpdateParams"]CODE
LOWsrc/openai/types/video_delete_response.py7__all__ = ["VideoDeleteResponse"]CODE
LOWsrc/openai/types/embedding_model.py5__all__ = ["EmbeddingModel"]CODE
LOWsrc/openai/types/upload.py9__all__ = ["Upload"]CODE
LOWsrc/openai/types/completion.py10__all__ = ["Completion"]CODE
LOWsrc/openai/types/video_model.py6__all__ = ["VideoModel"]CODE
LOWsrc/openai/types/file_chunking_strategy.py10__all__ = ["FileChunkingStrategy"]CODE
LOWsrc/openai/types/file_chunking_strategy_param.py11__all__ = ["FileChunkingStrategyParam"]CODE
LOWsrc/openai/types/embedding.py8__all__ = ["Embedding"]CODE
LOWsrc/openai/types/vector_store.py9__all__ = ["VectorStore", "FileCounts", "ExpiresAfter"]CODE
LOWsrc/openai/types/decision_input_part_union_param.py11__all__ = ["DecisionInputPartUnionParam"]CODE
LOWsrc/openai/types/video_get_character_response.py7__all__ = ["VideoGetCharacterResponse"]CODE
LOWsrc/openai/types/file_create_params.py10__all__ = ["FileCreateParams", "ExpiresAfter"]CODE
LOWsrc/openai/types/video_create_character_params.py9__all__ = ["VideoCreateCharacterParams"]CODE
LOWsrc/openai/types/decision_create_params.py10__all__ = [CODE
LOWsrc/openai/types/video_download_content_params.py7__all__ = ["VideoDownloadContentParams"]CODE
LOWsrc/openai/types/skill_create_params.py10__all__ = ["SkillCreateParams"]CODE
LOWsrc/openai/types/moderation.py10__all__ = ["Moderation", "Categories", "CategoryAppliedInputTypes", "CategoryScores"]CODE
LOWsrc/openai/types/image_gen_completed_event.py8__all__ = ["ImageGenCompletedEvent", "Usage", "UsageInputTokensDetails"]CODE
LOWsrc/openai/types/image_edit_partial_image_event.py8__all__ = ["ImageEditPartialImageEvent"]CODE
LOWsrc/openai/types/eval_create_params.py18__all__ = [CODE
LOWsrc/openai/types/batch.py12__all__ = ["Batch", "Errors"]CODE
LOWsrc/openai/types/video_edit_params.py10__all__ = ["VideoEditParams", "Video", "VideoVideoReferenceInputParam"]CODE
LOWsrc/openai/types/image_input_reference_param.py7__all__ = ["ImageInputReferenceParam"]CODE
LOWsrc/openai/types/skill_list_params.py7__all__ = ["SkillListParams"]CODE
LOWsrc/openai/types/image_edit_stream_event.py10__all__ = ["ImageEditStreamEvent"]CODE
LOWsrc/openai/types/completion_create_params.py11__all__ = ["CompletionCreateParamsBase", "CompletionCreateParamsNonStreaming", "CompletionCreateParamsStreaming"]CODE
LOWsrc/openai/types/auto_file_chunking_strategy_param.py7__all__ = ["AutoFileChunkingStrategyParam"]CODE
LOWsrc/openai/types/video_create_params.py14__all__ = ["VideoCreateParams", "InputReference"]CODE
LOWsrc/openai/types/vector_store_update_params.py10__all__ = ["VectorStoreUpdateParams", "ExpiresAfter"]CODE
LOWsrc/openai/types/image_gen_partial_image_event.py8__all__ = ["ImageGenPartialImageEvent"]CODE
LOWsrc/openai/types/moderation_image_url_input_param.py7__all__ = ["ModerationImageURLInputParam", "ImageURL"]CODE
LOWsrc/openai/types/batch_list_params.py7__all__ = ["BatchListParams"]CODE
1728 more matches not shown…
Cross-Language Confusion72 hits · 325 pts
SeverityFileLineSnippetContext
HIGHtests/test_streaming.py56 b'"choices":[{"index":0,"delta":{"content":"hello"},"finish_reason":null}]}\n\n'CODE
HIGHtests/test_streaming.py398 b'"finish_reason":null}]}\n\n'CODE
HIGH⚡tests/test_utils/test_json.py121 assert json_bytes == b'{"model":{"name":"Eve","email":null,"phone":null}}'CODE
HIGH⚡tests/test_utils/test_json.py126 assert json_bytes == b'{"model":{"name":"Frank","email":"frank@example.com","phone":null}}'CODE
HIGHtests/lib/chat/test_completions.py44 '{"id": "chatcmpl-ABfvaueLEMLNYbT8YzpJxsmiQ6HSY", "object": "chat.completion", "created": 1727346142, "modelCODE
HIGHtests/lib/chat/test_completions.py117 '{"id": "chatcmpl-ABfvbtVnTu5DeC4EFnRYj8mtfOM99", "object": "chat.completion", "created": 1727346143, "modelCODE
HIGHtests/lib/chat/test_completions.py191 '{"id": "chatcmpl-ABfvcC8grKYsRkSoMp9CCAhbXAd0b", "object": "chat.completion", "created": 1727346144, "modelCODE
HIGHtests/lib/chat/test_completions.py269 '{"id": "chatcmpl-ABfvjIatz0zrZu50gRbMtlp0asZpz", "object": "chat.completion", "created": 1727346151, "modelCODE
HIGHtests/lib/chat/test_completions.py319 '{"id": "chatcmpl-ABfvp8qzboW92q8ONDF4DPHlI7ckC", "object": "chat.completion", "created": 1727346157, "modelCODE
HIGHtests/lib/chat/test_completions.py400 '{"id": "chatcmpl-ABfvqhz4uUUWsw8Ohw2Mp9B4sKKV8", "object": "chat.completion", "created": 1727346158, "modelCODE
HIGHtests/lib/chat/test_completions.py470 '{"id": "chatcmpl-ABfvtNiaTNUF6OymZUnEFc9lPq9p1", "object": "chat.completion", "created": 1727346161, "modelCODE
HIGHtests/lib/chat/test_completions.py556 '{"id": "chatcmpl-ABfvvX7eB1KsfeZj8VcF3z7G7SbaA", "object": "chat.completion", "created": 1727346163, "mCODE
HIGHtests/lib/chat/test_completions.py583 '{"id": "chatcmpl-ABfvwoKVWPQj2UPlAcAKM7s40GsRx", "object": "chat.completion", "created": 1727346164, "modelCODE
HIGHtests/lib/chat/test_completions.py634 '{"id": "chatcmpl-ABfvx6Z4dchiW2nya1N8KMsHFrQRE", "object": "chat.completion", "created": 1727346165, "modelCODE
HIGHtests/lib/chat/test_completions.py710 '{"id": "chatcmpl-ABfvyvfNWKcl7Ohqos4UFrmMs1v4C", "object": "chat.completion", "created": 1727346166, "modelCODE
HIGHtests/lib/chat/test_completions.py793 '{"id": "chatcmpl-ABfvzdvCI6RaIkiEFNjqGXCSYnlzf", "object": "chat.completion", "created": 1727346167, "modelCODE
HIGHtests/lib/chat/test_completions.py871 '{"id": "chatcmpl-ABrDYCa8W1w66eUxKDO8TQF1m6trT", "object": "chat.completion", "created": 1727389540, "modelCODE
HIGHtests/lib/chat/test_completions.py951 '{"id": "chatcmpl-ABrDQWOiw0PK5JOsxl1D9ooeQgznq", "object": "chat.completion", "created": 1727389532, "modelCODE
HIGHtests/lib/responses/test_responses.py37 '{"id": "resp_689a0b2545288193953c892439b42e2800b2e36c65a1fd4b", "object": "response", "created_at": 1754925CODE
HIGHtests/lib/live/helpers.py109 result = grouper.push(value)CODE
HIGH⚡tests/lib/live/test_transcript_grouper_lifecycle.py25 grouper.push(text("One", speaker="user"))CODE
HIGH⚡tests/lib/live/test_transcript_grouper_lifecycle.py26 grouper.push(text(" two", speaker="user", start=200, end=400, item_id="two"))CODE
HIGH⚡tests/lib/live/test_transcript_grouper_lifecycle.py29 grouper.push(text(" three", speaker="user", start=400, end=600, item_id="three"))CODE
HIGH⚡tests/lib/live/test_transcript_grouper_lifecycle.py54 grouper.push(text("One", speaker="user"))CODE
HIGH⚡tests/lib/live/test_transcript_grouper_lifecycle.py55 grouper.push(text(" two", speaker="user", start=200, end=400, item_id="two"))CODE
HIGH⚡tests/lib/live/test_transcript_grouper_lifecycle.py89 grouper.push(text("after"))CODE
HIGH⚡tests/lib/live/test_transcript_grouper_lifecycle.py94 grouper.push(text())CODE
HIGH⚡tests/lib/live/test_transcript_grouper_lifecycle.py261 grouper.push(text())CODE
HIGH⚡tests/lib/live/test_transcript_grouper_lifecycle.py327 await grouper.push(text())CODE
HIGH⚡tests/lib/live/test_transcript_grouper_lifecycle.py339 sync.push(text())CODE
HIGH⚡tests/lib/live/test_transcript_grouper_lifecycle.py346 await asynchronous.push(text())CODE
HIGHtests/lib/live/test_transcript_grouper_lifecycle.py113 await grouper.push(text())CODE
HIGHtests/lib/live/test_transcript_grouper_lifecycle.py137 await grouper.push(text("One", speaker="user"))CODE
HIGHtests/lib/live/test_transcript_grouper_lifecycle.py138 sender = asyncio.create_task(grouper.push(text(" two", start=200, end=400, item_id="two", speaker="user")))CODE
HIGHtests/lib/live/test_transcript_grouper_lifecycle.py160 await grouper.push(text("One", speaker="user"))CODE
HIGHtests/lib/live/test_transcript_grouper_lifecycle.py161 sender = asyncio.create_task(grouper.push(text(" two", start=200, end=400, item_id="two", speaker="user")))CODE
HIGHtests/lib/live/test_transcript_grouper_lifecycle.py178 await grouper.push(text("One", speaker="user"))CODE
HIGHtests/lib/live/test_transcript_grouper_lifecycle.py191 caller = asyncio.create_task(grouper.push(text(" two", start=200, end=400, item_id="two", speaker="user")))CODE
HIGHtests/lib/live/test_transcript_grouper_lifecycle.py220 grouper.push(text("One", speaker="user"))CODE
HIGHtests/lib/live/test_transcript_grouper_lifecycle.py282 await grouper.push(text())CODE
HIGHexamples/live/transcript_grouper.py51 grouper.push(event)CODE
HIGHexamples/live/audio_transcript.py59 await transcript.push(event)CODE
HIGHscripts/castiron/custom_code_report.py6Hash v1: SHA256(domain || u64(entry count) || entries), where each entry isSTRING
HIGHscripts/castiron/custom_code_report.py7u64(path length) || path bytes || six ASCII Git mode bytes || u64(blob length)STRING
HIGHscripts/castiron/test_custom_code_budget.py138 '{"schema_version":1,"max_custom_patch_lines":null}',CODE
HIGHsrc/openai/types/beta/beta_web_search_tool.py27 If omitted or null, defaults to theSTRING
HIGHsrc/openai/types/beta/beta_web_search_tool.py87 If omitted or null, defaults to the United States. To avoid this fallback, passSTRING
HIGH…penai/types/beta/beta_web_search_preview_tool_param.py14 If omitted or null, defaults to the United States. To avoid this fallback, pass `{"type": "approximate"}` without loSTRING
HIGH…penai/types/beta/beta_web_search_preview_tool_param.py63 If omitted or null, defaults to the United States. To avoid this fallback, passSTRING
HIGHsrc/openai/types/beta/beta_web_search_tool_param.py29 If omitted or null, defaults to theSTRING
HIGHsrc/openai/types/beta/beta_web_search_tool_param.py89 If omitted or null, defaults to the United States. To avoid this fallback, passSTRING
HIGHsrc/openai/types/beta/beta_web_search_preview_tool.py14 If omitted or null, defaults to the United States. To avoid this fallback, pass `{"type": "approximate"}` without loSTRING
HIGHsrc/openai/types/beta/beta_web_search_preview_tool.py63 If omitted or null, defaults to the United States. To avoid this fallback, passSTRING
HIGH…ta/chatkit/chat_session_chatkit_configuration_param.py42 When omitted, history is enabled by default with no limit on recent_threads (null).STRING
HIGH…ta/chatkit/chat_session_chatkit_configuration_param.py75 (null).STRING
HIGHsrc/openai/types/responses/web_search_preview_tool.py14 If omitted or null, defaults to the United States. To avoid this fallback, pass `{"type": "approximate"}` without loSTRING
HIGHsrc/openai/types/responses/web_search_preview_tool.py63 If omitted or null, defaults to the United States. To avoid this fallback, passSTRING
HIGHsrc/openai/types/responses/web_search_tool_param.py29 If omitted or null, defaults to theSTRING
HIGHsrc/openai/types/responses/web_search_tool_param.py89 If omitted or null, defaults to the United States. To avoid this fallback, passSTRING
HIGH…penai/types/responses/web_search_preview_tool_param.py14 If omitted or null, defaults to the United States. To avoid this fallback, pass `{"type": "approximate"}` without loSTRING
12 more matches not shown…
AI Structural Patterns326 hits · 298 pts
SeverityFileLineSnippetContext
LOWtests/test_uv_workflows.py106CODE
LOWtests/test_uv_workflows.py1380CODE
LOWtests/lib/test_bedrock.py955CODE
LOWtests/respx2/models.py45CODE
LOWtests/respx2/models.py271CODE
LOWtests/respx2/models.py428CODE
LOWtests/respx2/utils.py113CODE
LOWtests/respx2/mocks.py184CODE
LOWtests/respx2/mocks.py193CODE
LOWscripts/castiron/test_custom_code_publication.py312CODE
LOWsrc/openai/_base_client.py2147CODE
LOWsrc/openai/_client.py164CODE
LOWsrc/openai/_client.py709CODE
LOWsrc/openai/_client.py930CODE
LOWsrc/openai/_client.py1488CODE
LOWsrc/openai/_models.py303CODE
LOWsrc/openai/_models.py374CODE
LOWsrc/openai/_vendor/httpx_aiohttp/transport.py77CODE
LOWsrc/openai/providers/bedrock.py383CODE
LOWsrc/openai/resources/files.py194CODE
LOWsrc/openai/resources/files.py535CODE
LOWsrc/openai/resources/completions.py50CODE
LOWsrc/openai/resources/completions.py209CODE
LOWsrc/openai/resources/completions.py368CODE
LOWsrc/openai/resources/completions.py527CODE
LOWsrc/openai/resources/completions.py620CODE
LOWsrc/openai/resources/completions.py779CODE
LOWsrc/openai/resources/completions.py938CODE
LOWsrc/openai/resources/completions.py1097CODE
LOWsrc/openai/resources/images.py52CODE
LOWsrc/openai/resources/images.py133CODE
LOWsrc/openai/resources/images.py259CODE
LOWsrc/openai/resources/images.py385CODE
LOWsrc/openai/resources/images.py511CODE
LOWsrc/openai/resources/images.py582CODE
LOWsrc/openai/resources/images.py699CODE
LOWsrc/openai/resources/images.py816CODE
LOWsrc/openai/resources/images.py933CODE
LOWsrc/openai/resources/images.py1021CODE
LOWsrc/openai/resources/images.py1102CODE
LOWsrc/openai/resources/images.py1228CODE
LOWsrc/openai/resources/images.py1354CODE
LOWsrc/openai/resources/images.py1480CODE
LOWsrc/openai/resources/images.py1551CODE
LOWsrc/openai/resources/images.py1668CODE
LOWsrc/openai/resources/images.py1785CODE
LOWsrc/openai/resources/images.py1902CODE
LOWsrc/openai/resources/videos.py71CODE
LOWsrc/openai/resources/videos.py140CODE
LOWsrc/openai/resources/videos.py662CODE
LOWsrc/openai/resources/videos.py731CODE
LOWsrc/openai/resources/beta/assistants.py58CODE
LOWsrc/openai/resources/beta/assistants.py227CODE
LOWsrc/openai/resources/beta/assistants.py408CODE
LOWsrc/openai/resources/beta/assistants.py537CODE
LOWsrc/openai/resources/beta/assistants.py706CODE
LOWsrc/openai/resources/beta/assistants.py887CODE
LOWsrc/openai/resources/beta/responses/responses.py112CODE
LOWsrc/openai/resources/beta/responses/responses.py522CODE
LOWsrc/openai/resources/beta/responses/responses.py932CODE
266 more matches not shown…
Empty Error Handlers30 hits · 150 pts
SeverityFileLineSnippetContext
HIGHtests/utils.py123except ValueError:CODE
HIGHtests/lib/responses/test_websocket_contract.py75except ConnectionClosedOK:CODE
HIGHtests/respx2/fixtures.py3except ImportError: # pragma: nocoverCODE
HIGHtests/respx2/mocks.py86except AttributeError:CODE
HIGHexamples/realtime/push_to_talk_app.py258except KeyboardInterrupt:CODE
HIGHexamples/realtime/audio_util.py138except KeyboardInterrupt:CODE
HIGHsrc/openai/_base_client.py960except Exception:CODE
HIGHsrc/openai/_base_client.py1584except Exception:CODE
HIGHsrc/openai/__init__.py149except (TypeError, AttributeError):CODE
HIGHsrc/openai/_streaming.py424except (TypeError, ValueError):CODE
HIGHsrc/openai/_models.py622except Exception:CODE
HIGHsrc/openai/_event_handler.py42except ValueError:CODE
HIGHsrc/openai/auth/_x509.py357except ValueError:CODE
HIGHsrc/openai/resources/beta/responses/responses.py4440except Exception:CODE
HIGHsrc/openai/resources/beta/responses/responses.py4933except Exception:CODE
HIGHsrc/openai/resources/responses/responses.py4293except Exception:CODE
HIGHsrc/openai/resources/responses/responses.py4798except Exception:CODE
HIGHsrc/openai/resources/realtime/realtime.py502except Exception:CODE
HIGHsrc/openai/resources/realtime/realtime.py1027except Exception:CODE
HIGHsrc/openai/resources/live/sideband.py315except Exception:CODE
HIGHsrc/openai/resources/live/sideband.py820except Exception:CODE
HIGHsrc/openai/resources/live/forks.py310except Exception:CODE
HIGHsrc/openai/resources/live/forks.py803except Exception:CODE
HIGHsrc/openai/resources/live/live.py531except Exception:CODE
HIGHsrc/openai/resources/live/live.py1021except Exception:CODE
HIGHsrc/openai/lib/responses_websocket/_session.py614except asyncio.CancelledError:CODE
HIGHsrc/openai/lib/responses_websocket/_session.py457except Exception:CODE
HIGHsrc/openai/lib/responses_websocket/_session.py593except Exception:CODE
HIGHsrc/openai/lib/streaming/agents/_dispatch.py100except Exception:CODE
HIGHsrc/openai/lib/streaming/agents/_dispatch.py152except Exception:CODE
Deep Nesting185 hits · 146 pts
SeverityFileLineSnippetContext
LOWtests/test_module_client.py194CODE
LOWtests/test_httpx2.py670CODE
LOWtests/test_tls_hostname.py197CODE
LOWtests/test_debug_logging.py31CODE
LOWtests/test_debug_logging.py155CODE
LOWtests/test_debug_logging.py231CODE
LOWtests/test_debug_logging.py277CODE
LOWtests/test_streaming.py44CODE
LOWtests/test_retry_after_overflow.py29CODE
LOWtests/utils.py56CODE
LOWtests/test_uv_workflows.py406CODE
LOWtests/test_uv_workflows.py507CODE
LOWtests/test_uv_workflows.py593CODE
LOWtests/test_uv_workflows.py702CODE
LOWtests/test_uv_workflows.py782CODE
LOWtests/test_uv_workflows.py894CODE
LOWtests/test_uv_workflows.py1380CODE
LOWtests/test_uv_workflows.py2403CODE
LOWtests/test_uv_workflows.py2589CODE
LOWtests/test_uv_workflows.py2678CODE
LOWtests/test_uv_workflows.py2755CODE
LOWtests/test_uv_workflows.py2871CODE
LOWtests/test_uv_workflows.py3041CODE
LOWtests/test_uv_workflows.py3164CODE
LOWtests/test_uv_workflows.py3242CODE
LOWtests/test_uv_workflows.py3554CODE
LOWtests/test_uv_workflows.py3680CODE
LOWtests/test_uv_workflows.py3793CODE
LOWtests/test_uv_workflows.py3944CODE
LOWtests/test_uv_workflows.py4090CODE
LOWtests/test_uv_workflows.py4267CODE
LOWtests/test_uv_workflows.py4334CODE
LOWtests/test_uv_workflows.py4424CODE
LOWtests/test_uv_workflows.py4524CODE
LOWtests/test_uv_workflows.py4598CODE
LOWtests/test_uv_workflows.py4660CODE
LOWtests/test_uv_workflows.py4900CODE
LOWtests/test_uv_workflows.py5005CODE
LOWtests/test_uv_workflows.py5090CODE
LOWtests/test_uv_workflows.py5156CODE
LOWtests/test_uv_workflows.py5232CODE
LOWtests/test_uv_workflows.py5288CODE
LOWtests/test_uv_workflows.py5354CODE
LOWtests/test_uv_workflows.py5441CODE
LOWtests/test_uv_workflows.py5524CODE
LOWtests/test_uv_workflows.py6498CODE
LOWtests/test_uv_workflows.py6594CODE
LOWtests/test_client.py3546CODE
LOWtests/test_client.py3659CODE
LOWtests/lib/test_websocket_urls.py40CODE
LOWtests/lib/test_realtime_websocket_recovery.py30CODE
LOWtests/lib/test_realtime_websocket_recovery.py77CODE
LOWtests/lib/test_realtime_websocket_recovery.py129CODE
LOWtests/lib/test_bedrock_auth_conformance.py151CODE
LOWtests/lib/test_bedrock_auth_conformance.py542CODE
LOWtests/lib/test_audio.py19CODE
LOWtests/lib/test_audio.py54CODE
LOWtests/lib/test_realtime_calls.py21CODE
LOWtests/lib/bedrock_live.py114CODE
LOWtests/lib/test_azure_provider_diagnostics.py132CODE
125 more matches not shown…
Excessive Try-Catch Wrapping111 hits · 126 pts
SeverityFileLineSnippetContext
LOWREADME.md620 except Exception as e:CODE
LOWREADME.md656 except Exception as e:CODE
LOWtests/test_uv_workflows.py1543 except Exception:CODE
LOWtests/lib/responses/test_websocket_contract.py79 except Exception as exc:CODE
LOWtests/lib/responses/test_websocket_session.py141 except Exception as exc:CODE
LOWtests/respx2/patterns.py152 except Exception:CODE
LOWtests/respx2/models.py342 except Exception as error:CODE
LOWtests/respx2/router.py299 except Exception as error:CODE
LOWexamples/image_stream.py52 except Exception as error:CODE
MEDIUMexamples/image_stream.py53 print(f"Error generating image: {error}")CODE
LOWscripts/utils/ruffen-docs.py42 except Exception as e:CODE
MEDIUMsrc/openai/_base_client.py2221def get_platform() -> Platform:CODE
MEDIUMsrc/openai/_base_client.py2296def get_python_runtime() -> str:CODE
MEDIUMsrc/openai/_base_client.py2303def get_python_version() -> str:CODE
MEDIUMsrc/openai/_base_client.py2310def get_architecture() -> Arch:CODE
LOW⚡src/openai/_base_client.py2299 except Exception:CODE
LOW⚡src/openai/_base_client.py2306 except Exception:CODE
LOW⚡src/openai/_base_client.py2313 except Exception:CODE
LOWsrc/openai/_base_client.py500 except Exception:CODE
LOWsrc/openai/_base_client.py960 except Exception:CODE
LOWsrc/openai/_base_client.py1584 except Exception:CODE
LOWsrc/openai/_base_client.py2225 except Exception:CODE
LOWsrc/openai/_response.py249 except Exception as exc:CODE
LOWsrc/openai/_legacy_response.py316 except Exception as exc:CODE
LOWsrc/openai/_models.py622 except Exception:CODE
LOWsrc/openai/_models.py651 except Exception:CODE
LOWsrc/openai/_models.py697 except Exception:CODE
LOWsrc/openai/_models.py703 except Exception:CODE
LOWsrc/openai/_utils/_proxy.py51 except Exception:CODE
LOWsrc/openai/_utils/_utils.py410 except Exception:CODE
MEDIUMsrc/openai/_utils/_utils.py407def get_async_library() -> str:CODE
LOWsrc/openai/_vendor/httpx_aiohttp/transport.py44 except Exception as exc:CODE
MEDIUMsrc/openai/_vendor/httpx_aiohttp/transport.py41def map_aiohttp_exceptions() -> typing.Iterator[None]:CODE
LOWsrc/openai/auth/_workload.py97 except Exception as e:CODE
LOWsrc/openai/auth/_workload.py157 except Exception as e:CODE
LOWsrc/openai/auth/_workload.py201 except Exception as e:CODE
MEDIUMsrc/openai/auth/_workload.py90def get_token() -> str:CODE
MEDIUMsrc/openai/auth/_workload.py128def get_token() -> str:CODE
MEDIUMsrc/openai/auth/_workload.py181def get_token() -> str:CODE
LOWsrc/openai/providers/bedrock.py158 except Exception as exc:CODE
LOWsrc/openai/providers/bedrock.py177 except Exception as exc:CODE
MEDIUMsrc/openai/providers/bedrock.py153def _resolve_token(self) -> str:CODE
MEDIUMsrc/openai/providers/bedrock.py170def _resolve_token_async(self) -> str:CODE
LOWsrc/openai/resources/beta/responses/responses.py4408 except Exception:CODE
LOWsrc/openai/resources/beta/responses/responses.py4440 except Exception:CODE
LOWsrc/openai/resources/beta/responses/responses.py4454 except Exception:CODE
LOWsrc/openai/resources/beta/responses/responses.py4901 except Exception:CODE
LOWsrc/openai/resources/beta/responses/responses.py4933 except Exception:CODE
LOWsrc/openai/resources/beta/responses/responses.py4943 except Exception:CODE
LOWsrc/openai/resources/responses/responses.py4261 except Exception:CODE
LOWsrc/openai/resources/responses/responses.py4293 except Exception:CODE
LOWsrc/openai/resources/responses/responses.py4307 except Exception:CODE
LOWsrc/openai/resources/responses/responses.py4760 except Exception:CODE
LOWsrc/openai/resources/responses/responses.py4798 except Exception:CODE
LOWsrc/openai/resources/responses/responses.py4808 except Exception:CODE
LOWsrc/openai/resources/realtime/realtime.py470 except Exception:CODE
LOWsrc/openai/resources/realtime/realtime.py502 except Exception:CODE
LOWsrc/openai/resources/realtime/realtime.py516 except Exception:CODE
LOWsrc/openai/resources/realtime/realtime.py995 except Exception:CODE
LOWsrc/openai/resources/realtime/realtime.py1027 except Exception:CODE
51 more matches not shown…
Fake / Example Data44 hits · 49 pts
SeverityFileLineSnippetContext
LOWtests/test_send_queue_reconnect.py33 api_key="fake-key",CODE
LOWtests/test_send_queue_reconnect.py76 api_key="fake-key", websocket_base_url="wss://origin.test", http_client=async_http_client()CODE
LOWtests/test_tls_hostname.py40 return http.Response(200, json={"access_token": "fake-token", "expires_in": 3600})CODE
LOWtests/test_tls_hostname.py84 return http.Response(200, json={"access_token": "fake-token", "expires_in": 3600})CODE
LOW⚡tests/test_client.py3617 AsyncOpenAI(api_key="fake-key", max_retries=1, http_client=httpx2.AsyncClient(transport=transport))CODE
LOW⚡tests/test_client.py3619 else OpenAI(api_key="fake-key", max_retries=1, http_client=httpx2.Client(transport=transport))CODE
LOWtests/test_client.py3568 AsyncOpenAI(api_key="fake-key", http_client=httpx2.AsyncClient(transport=transport))CODE
LOWtests/test_client.py3570 else OpenAI(api_key="fake-key", http_client=httpx2.Client(transport=transport))CODE
LOWtests/test_client.py3639 client = AsyncOpenAI(api_key="fake-key") if is_async else OpenAI(api_key="fake-key")CODE
LOWtests/test_client.py3673 AsyncOpenAI(api_key="fake-key", max_retries=max_retries, http_client=httpx2.AsyncClient(transport=transport))CODE
LOWtests/test_client.py3675 else OpenAI(api_key="fake-key", max_retries=max_retries, http_client=httpx2.Client(transport=transport))CODE
LOW⚡tests/test_utils/test_json.py98 address = Address(street="123 Main St")CODE
LOW⚡tests/test_utils/test_json.py102 assert json_bytes == b'{"user":{"name":"Diana","address":{"street":"123 Main St"}}}'CODE
LOW⚡tests/lib/test_embeddings.py142 "user": "fake-user",CODE
LOWtests/lib/test_embeddings.py165 "user": "fake-user",CODE
LOWtests/lib/test_embeddings.py197 "user": "fake-user",CODE
LOWtests/lib/test_websocket_redirects.py24EXTRA_HEADERS = {"api-key": "fake-key", "Cookie": "fake-cookie", "X-Custom": "fake-private-header"}CODE
LOWtests/lib/test_websocket_redirects.py155 api_key="fake-key", websocket_base_url="wss://origin.test", http_client=async_http_client()CODE
LOWtests/lib/test_websocket_redirects.py173 api_key="fake-key", websocket_base_url="wss://origin.test", http_client=async_http_client()CODE
LOW⚡tests/lib/test_websocket_redirects.py187 assert headers["Authorization"] == "Bearer fake-key"CODE
LOW⚡tests/lib/test_websocket_redirects.py196 api_key="fake-key",CODE
LOW⚡tests/lib/test_websocket_redirects.py211 assert all(uri.host == "origin.test" and headers["api-key"] == "fake-key" for uri, headers in handshakes.attempts)CODE
LOW⚡tests/lib/test_websocket_redirects.py220 api_key="fake-key",CODE
LOWtests/lib/test_websocket_redirects.py233 assert connect_mock.call_args.kwargs["additional_headers"]["Authorization"] == "Bearer fake-key"CODE
LOWtests/lib/test_azure_auth.py160 return f"fake-token-{calls}"CODE
LOW⚡tests/lib/test_azure_auth.py182 expected_auth("azure_ad_token", "fake-token-1"),CODE
LOW⚡tests/lib/test_azure_auth.py183 expected_auth("azure_ad_token", "fake-token-2"),CODE
LOW⚡tests/lib/test_azure_auth.py186 assert auth(headers) == expected_auth("azure_ad_token", "fake-token-3")CODE
LOWtests/lib/test_azure_auth.py218 return f"fake-key-{calls}"CODE
LOWtests/lib/test_azure_auth.py262 assert websocket_headers == [expected_auth("api_key", f"fake-key-{i}") for i in (4, 5)]CODE
LOWtests/lib/test_azure_auth.py264 expected_auth("api_key", f"fake-key-{i}") for i in (1, 2, 3)CODE
LOWtests/lib/test_azure_auth.py277 assert auth(requests[-1].headers) == expected_auth("api_key", "fake-key-6")CODE
LOW⚡tests/lib/test_azure_deployment_path.py47 client = client_type(api_key="fake-key", api_version=_API_VERSION, azure_endpoint=_ENDPOINT)CODE
LOW⚡tests/lib/test_azure_deployment_path.py60 client = client_type(api_key="fake-key", api_version=_API_VERSION, azure_endpoint=_ENDPOINT)CODE
LOW⚡tests/lib/test_azure_deployment_path.py72 api_key="fake-key", api_version=_API_VERSION, azure_endpoint=_ENDPOINT, azure_deployment=deploymentCODE
LOWtests/lib/test_azure_deployment_path.py91 api_key="fake-key",CODE
LOWtests/lib/test_azure_deployment_path.py111 api_key="fake-key",CODE
LOW⚡tests/lib/test_azure_deployment_path.py128 api_key="fake-key",CODE
LOW⚡tests/lib/test_azure_deployment_path.py143 api_key="fake-key",CODE
LOWtests/lib/test_azure_redirects.py101 result = client.models.with_raw_response.list(extra_headers={"Authorization": "Bearer fake-token"})CODE
LOW⚡tests/lib/test_azure_redirects.py120 result = await client.models.with_raw_response.list(extra_headers={"Authorization": "Bearer fake-token"})CODE
LOWtests/lib/test_azure.py984 json_data={"model": "placeholder"},CODE
LOWtests/lib/responses/test_websocket_session.py833 with OpenAI(api_key="fake-key", base_url=url, http_client=httpx2.Client(trust_env=False)) as client:CODE
LOWtests/lib/responses/test_websocket_session.py857 api_key="fake-key", base_url=url, http_client=httpx2.AsyncClient(trust_env=False)CODE
Slop Phrases7 hits · 14 pts
SeverityFileLineSnippetContext
MEDIUMtests/lib/chat/test_completions_streaming.py73 content="I'm unable to provide real-time weather updates. To get the current weather in San Francisco, ISTRING
MEDIUMtests/lib/chat/test_completions_streaming.py88 content="I'm unable to provide real-time weather updates. To get the current weather in San Francisco, I recommendSTRING
MEDIUMtests/lib/chat/test_completions_streaming.py1099 content="I'm unable to provide real-time weather updates. To get the current weather in San Francisco, ICODE
MEDIUMtests/lib/chat/test_completions.py62 content="I'm unable to provide real-time weather updates. To get the current weather in San Francisco, ISTRING
MEDIUMexamples/streaming.py50 # In Python 3.10+ you can also use the `await anext(response)` builtin insteadCOMMENT
MEDIUM…c/openai/types/evals/runs/output_item_list_response.py38 # To access properties that are not valid identifiers you can use `getattr`, e.g.COMMENT
MEDIUM…enai/types/evals/runs/output_item_retrieve_response.py38 # To access properties that are not valid identifiers you can use `getattr`, e.g.COMMENT
AI Slop Vocabulary6 hits · 12 pts
SeverityFileLineSnippetContext
LOWpyproject.toml195# it's fine to just use Pyright.COMMENT
MEDIUMtests/lib/test_websocket_redirects.py43 # The socket-free harness needs only synthetic values for required URL arguments.COMMENT
MEDIUMtests/api_resources/_websocket_resources.py3# Consumed by the SDK-owned tests/lib/test_websocket_redirects.py harness.COMMENT
LOWsrc/openai/_response.py265 # If the API responds with content that isn't JSON then we just returnCOMMENT
LOWsrc/openai/_legacy_response.py332 # If the API responds with content that isn't JSON then we just returnCOMMENT
LOWsrc/openai/_models.py491 # If the type cannot be reconstructed, just return the validated listCOMMENT
Synthetic Comment Markers4 hits · 10 pts
SeverityFileLineSnippetContext
HIGHsrc/openai/types/content_provenance_check.py29 file. The content could still have been generated by OpenAI if the metadata wasSTRING
HIGHsrc/openai/types/content_provenance_check.py57 could still have been generated by OpenAI if the metadata was stripped or hasSTRING
HIGHsrc/openai/resources/content_provenance_checks.py59 uploaded file. The content could still have been generated by OpenAI if theSTRING
HIGHsrc/openai/resources/content_provenance_checks.py133 uploaded file. The content could still have been generated by OpenAI if theSTRING
Overly Generic Function Names6 hits · 6 pts
SeverityFileLineSnippetContext
LOWtests/test_x509_workload_identity.py700 def handle_request(self, request: httpx2.Request) -> httpx2.Response:CODE
LOWtests/test_x509_workload_identity_regressions.py537 def handle_request(self, request: httpx2.Request) -> httpx2.Response:CODE
LOWtests/test_client.py84 def handle_request(CODE
LOWtests/lib/chat/test_single_pass_tools.py47 def handle_request(request: httpx2.Request) -> httpx2.Response:CODE
LOWtests/respx2/transports.py75 def handle_request(self, request: httpx.Request) -> httpx.Response:CODE
LOWsrc/openai/auth/_x509.py146 def handle_request(self, request: httpx2.Request) -> httpx2.Response:CODE
Modern AI Meta-Vocabulary2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMtests/lib/responses/test_websocket_accumulator.py109 # The existing SSE state needs item + part scaffolding. Prove itCOMMENT
MEDIUMsrc/openai/lib/beta/agents/_files.py216 # and archive (e.g. ZIP) upload/extraction; that orchestration is outsideCOMMENT
Over-Commented Block6 hits · 6 pts
SeverityFileLineSnippetContext
LOW.devcontainer/devcontainer.json41 // Configure tool-specific properties.COMMENT
LOWexamples/realtime/push_to_talk_app.py1#!/usr/bin/env -S uv runCOMMENT
LOWsrc/openai/_types.py101# method that uses `ResponseT` which would lead to an unacceptableCOMMENT
LOWsrc/openai/_client.py181 # Configure a custom httpx2 client.COMMENT
LOWsrc/openai/_client.py941 data_residency: DataResidency | None = None,COMMENT
LOWsrc/openai/_models.py621 return validate_type(type_=cast("type[object]", original_type or type_), value=value)COMMENT
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHsrc/openai/_utils/_path.py79Interpolate {name} placeholders in `template` from keyword arguments. Args: template: The template string cSTRING
Self-Referential Comments2 hits · 2 pts
SeverityFileLineSnippetContext
MEDIUMsrc/openai/_base_client.py1055 """This method is used as a callback for mutating the `Request` objectSTRING
MEDIUMsrc/openai/_base_client.py1676 """This method is used as a callback for mutating the `Request` objectSTRING