Repository Analysis

openai/openai-python

The official Python library for the OpenAI API

185.7 Strong AI signal View on GitHub
185.7
Adjusted Score
185.7
Raw Score
100%
Time Factor
2026-05-29
Last Push
30,843
Stars
Python
Language
186,517
Lines of Code
1455
Files
9098
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 1060HIGH 3893MEDIUM 18LOW 4127

Pattern Findings

9098 matches across 14 categories. Click a row to expand file-level details.

Cross-File Repetition3873 hits · 19365 pts
SeverityFileLineSnippet
HIGHsrc/openai/_response.py0close the response and release the connection. automatically called if the response body is read to completion.
HIGHsrc/openai/_response.py0close the response and release the connection. automatically called if the response body is read to completion.
HIGHsrc/openai/_streaming.py0close the response and release the connection. automatically called if the response body is read to completion.
HIGHsrc/openai/_streaming.py0close the response and release the connection. automatically called if the response body is read to completion.
HIGHsrc/openai/lib/streaming/chat/_completions.py0close the response and release the connection. automatically called if the response body is read to completion.
HIGHsrc/openai/lib/streaming/chat/_completions.py0close the response and release the connection. automatically called if the response body is read to completion.
HIGHsrc/openai/lib/streaming/responses/_responses.py0close the response and release the connection. automatically called if the response body is read to completion.
HIGHsrc/openai/lib/streaming/responses/_responses.py0close the response and release the connection. automatically called if the response body is read to completion.
HIGHsrc/openai/_response.py0higher order function that takes one of our bound api methods and wraps it to support returning the raw `apiresponse` ob
HIGHsrc/openai/_response.py0higher order function that takes one of our bound api methods and wraps it to support returning the raw `apiresponse` ob
HIGHsrc/openai/_legacy_response.py0higher order function that takes one of our bound api methods and wraps it to support returning the raw `apiresponse` ob
HIGHsrc/openai/_legacy_response.py0higher order function that takes one of our bound api methods and wraps it to support returning the raw `apiresponse` ob
HIGHsrc/openai/_streaming.py0given an iterator that yields raw binary data, iterate over it & yield every event encountered
HIGHsrc/openai/_streaming.py0given an iterator that yields raw binary data, iterate over it & yield every event encountered
HIGHsrc/openai/_streaming.py0given an iterator that yields raw binary data, iterate over it & yield every event encountered
HIGHsrc/openai/_client.py0given a prompt, the model will return one or more predicted completions, and can also return the probabilities of altern
HIGHsrc/openai/_client.py0given a prompt, the model will return one or more predicted completions, and can also return the probabilities of altern
HIGHsrc/openai/_client.py0given a prompt, the model will return one or more predicted completions, and can also return the probabilities of altern
HIGHsrc/openai/_client.py0given a prompt, the model will return one or more predicted completions, and can also return the probabilities of altern
HIGHsrc/openai/_client.py0given a prompt, the model will return one or more predicted completions, and can also return the probabilities of altern
HIGHsrc/openai/_client.py0given a prompt, the model will return one or more predicted completions, and can also return the probabilities of altern
HIGHsrc/openai/resources/completions.py0given a prompt, the model will return one or more predicted completions, and can also return the probabilities of altern
HIGHsrc/openai/resources/completions.py0given a prompt, the model will return one or more predicted completions, and can also return the probabilities of altern
HIGHsrc/openai/_client.py0get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
HIGHsrc/openai/_client.py0get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
HIGHsrc/openai/_client.py0get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
HIGHsrc/openai/_client.py0get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
HIGHsrc/openai/_client.py0get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
HIGHsrc/openai/_client.py0get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
HIGHsrc/openai/resources/embeddings.py0get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
HIGHsrc/openai/resources/embeddings.py0get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
HIGHsrc/openai/_client.py0files are used to upload documents that can be used with features like assistants and fine-tuning.
HIGHsrc/openai/_client.py0files are used to upload documents that can be used with features like assistants and fine-tuning.
HIGHsrc/openai/_client.py0files are used to upload documents that can be used with features like assistants and fine-tuning.
HIGHsrc/openai/_client.py0files are used to upload documents that can be used with features like assistants and fine-tuning.
HIGHsrc/openai/_client.py0files are used to upload documents that can be used with features like assistants and fine-tuning.
HIGHsrc/openai/_client.py0files are used to upload documents that can be used with features like assistants and fine-tuning.
HIGHsrc/openai/resources/files.py0files are used to upload documents that can be used with features like assistants and fine-tuning.
HIGHsrc/openai/resources/files.py0files are used to upload documents that can be used with features like assistants and fine-tuning.
HIGHsrc/openai/_client.py0given a prompt and/or an input image, the model will generate a new image.
HIGHsrc/openai/_client.py0given a prompt and/or an input image, the model will generate a new image.
HIGHsrc/openai/_client.py0given a prompt and/or an input image, the model will generate a new image.
HIGHsrc/openai/_client.py0given a prompt and/or an input image, the model will generate a new image.
HIGHsrc/openai/_client.py0given a prompt and/or an input image, the model will generate a new image.
HIGHsrc/openai/_client.py0given a prompt and/or an input image, the model will generate a new image.
HIGHsrc/openai/resources/images.py0given a prompt and/or an input image, the model will generate a new image.
HIGHsrc/openai/resources/images.py0given a prompt and/or an input image, the model will generate a new image.
HIGHsrc/openai/_client.py0given text and/or image inputs, classifies if those inputs are potentially harmful.
HIGHsrc/openai/_client.py0given text and/or image inputs, classifies if those inputs are potentially harmful.
HIGHsrc/openai/_client.py0given text and/or image inputs, classifies if those inputs are potentially harmful.
HIGHsrc/openai/_client.py0given text and/or image inputs, classifies if those inputs are potentially harmful.
HIGHsrc/openai/_client.py0given text and/or image inputs, classifies if those inputs are potentially harmful.
HIGHsrc/openai/_client.py0given text and/or image inputs, classifies if those inputs are potentially harmful.
HIGHsrc/openai/resources/moderations.py0given text and/or image inputs, classifies if those inputs are potentially harmful.
HIGHsrc/openai/resources/moderations.py0given text and/or image inputs, classifies if those inputs are potentially harmful.
HIGHsrc/openai/_client.py0list and describe the various models available in the api.
HIGHsrc/openai/_client.py0list and describe the various models available in the api.
HIGHsrc/openai/_client.py0list and describe the various models available in the api.
HIGHsrc/openai/_client.py0list and describe the various models available in the api.
HIGHsrc/openai/_client.py0list and describe the various models available in the api.
3813 more matches not shown…
Hallucination Indicators1060 hits · 11720 pts
SeverityFileLineSnippet
CRITICALtests/api_resources/beta/chatkit/test_sessions.py62 response = client.beta.chatkit.sessions.with_raw_response.create(
CRITICALtests/api_resources/beta/chatkit/test_sessions.py74 with client.beta.chatkit.sessions.with_streaming_response.create(
CRITICALtests/api_resources/beta/chatkit/test_sessions.py95 response = client.beta.chatkit.sessions.with_raw_response.cancel(
CRITICALtests/api_resources/beta/chatkit/test_sessions.py106 with client.beta.chatkit.sessions.with_streaming_response.cancel(
CRITICALtests/api_resources/beta/chatkit/test_sessions.py120 client.beta.chatkit.sessions.with_raw_response.cancel(
CRITICALtests/api_resources/beta/chatkit/test_sessions.py170 response = await async_client.beta.chatkit.sessions.with_raw_response.create(
CRITICALtests/api_resources/beta/chatkit/test_sessions.py182 async with async_client.beta.chatkit.sessions.with_streaming_response.create(
CRITICALtests/api_resources/beta/chatkit/test_sessions.py203 response = await async_client.beta.chatkit.sessions.with_raw_response.cancel(
CRITICALtests/api_resources/beta/chatkit/test_sessions.py214 async with async_client.beta.chatkit.sessions.with_streaming_response.cancel(
CRITICALtests/api_resources/beta/chatkit/test_sessions.py228 await async_client.beta.chatkit.sessions.with_raw_response.cancel(
CRITICALtests/api_resources/beta/chatkit/test_threads.py31 response = client.beta.chatkit.threads.with_raw_response.retrieve(
CRITICALtests/api_resources/beta/chatkit/test_threads.py42 with client.beta.chatkit.threads.with_streaming_response.retrieve(
CRITICALtests/api_resources/beta/chatkit/test_threads.py56 client.beta.chatkit.threads.with_raw_response.retrieve(
CRITICALtests/api_resources/beta/chatkit/test_threads.py78 response = client.beta.chatkit.threads.with_raw_response.list()
CRITICALtests/api_resources/beta/chatkit/test_threads.py87 with client.beta.chatkit.threads.with_streaming_response.list() as response:
CRITICALtests/api_resources/beta/chatkit/test_threads.py105 response = client.beta.chatkit.threads.with_raw_response.delete(
CRITICALtests/api_resources/beta/chatkit/test_threads.py116 with client.beta.chatkit.threads.with_streaming_response.delete(
CRITICALtests/api_resources/beta/chatkit/test_threads.py154 response = client.beta.chatkit.threads.with_raw_response.list_items(
CRITICALtests/api_resources/beta/chatkit/test_threads.py165 with client.beta.chatkit.threads.with_streaming_response.list_items(
CRITICALtests/api_resources/beta/chatkit/test_threads.py198 response = await async_client.beta.chatkit.threads.with_raw_response.retrieve(
CRITICALtests/api_resources/beta/chatkit/test_threads.py209 async with async_client.beta.chatkit.threads.with_streaming_response.retrieve(
CRITICALtests/api_resources/beta/chatkit/test_threads.py223 await async_client.beta.chatkit.threads.with_raw_response.retrieve(
CRITICALtests/api_resources/beta/chatkit/test_threads.py245 response = await async_client.beta.chatkit.threads.with_raw_response.list()
CRITICALtests/api_resources/beta/chatkit/test_threads.py254 async with async_client.beta.chatkit.threads.with_streaming_response.list() as response:
CRITICALtests/api_resources/beta/chatkit/test_threads.py272 response = await async_client.beta.chatkit.threads.with_raw_response.delete(
CRITICALtests/api_resources/beta/chatkit/test_threads.py283 async with async_client.beta.chatkit.threads.with_streaming_response.delete(
CRITICALtests/api_resources/beta/chatkit/test_threads.py321 response = await async_client.beta.chatkit.threads.with_raw_response.list_items(
CRITICALtests/api_resources/beta/chatkit/test_threads.py332 async with async_client.beta.chatkit.threads.with_streaming_response.list_items(
CRITICALtests/api_resources/beta/chatkit/test_threads.py130 client.beta.chatkit.threads.with_raw_response.delete(
CRITICALtests/api_resources/beta/chatkit/test_threads.py179 client.beta.chatkit.threads.with_raw_response.list_items(
CRITICALtests/api_resources/beta/chatkit/test_threads.py297 await async_client.beta.chatkit.threads.with_raw_response.delete(
CRITICALtests/api_resources/beta/chatkit/test_threads.py346 await async_client.beta.chatkit.threads.with_raw_response.list_items(
CRITICALtests/api_resources/beta/threads/test_runs.py248 client.beta.threads.runs.with_raw_response.retrieve(
CRITICALtests/api_resources/beta/threads/test_runs.py254 client.beta.threads.runs.with_raw_response.retrieve(
CRITICALtests/api_resources/beta/threads/test_runs.py348 response = client.beta.threads.runs.with_raw_response.list(
CRITICALtests/api_resources/beta/threads/test_runs.py360 with client.beta.threads.runs.with_streaming_response.list(
CRITICALtests/api_resources/beta/threads/test_runs.py798 await async_client.beta.threads.runs.with_raw_response.retrieve(
CRITICALtests/api_resources/beta/threads/test_runs.py804 await async_client.beta.threads.runs.with_raw_response.retrieve(
CRITICALtests/api_resources/beta/threads/test_runs.py898 response = await async_client.beta.threads.runs.with_raw_response.list(
CRITICALtests/api_resources/beta/threads/test_runs.py910 async with async_client.beta.threads.runs.with_streaming_response.list(
CRITICALtests/api_resources/beta/threads/test_runs.py80 response = client.beta.threads.runs.with_raw_response.create(
CRITICALtests/api_resources/beta/threads/test_runs.py93 with client.beta.threads.runs.with_streaming_response.create(
CRITICALtests/api_resources/beta/threads/test_runs.py109 client.beta.threads.runs.with_raw_response.create(
CRITICALtests/api_resources/beta/threads/test_runs.py170 response = client.beta.threads.runs.with_raw_response.create(
CRITICALtests/api_resources/beta/threads/test_runs.py183 with client.beta.threads.runs.with_streaming_response.create(
CRITICALtests/api_resources/beta/threads/test_runs.py200 client.beta.threads.runs.with_raw_response.create(
CRITICALtests/api_resources/beta/threads/test_runs.py219 response = client.beta.threads.runs.with_raw_response.retrieve(
CRITICALtests/api_resources/beta/threads/test_runs.py232 with client.beta.threads.runs.with_streaming_response.retrieve(
CRITICALtests/api_resources/beta/threads/test_runs.py283 response = client.beta.threads.runs.with_raw_response.update(
CRITICALtests/api_resources/beta/threads/test_runs.py296 with client.beta.threads.runs.with_streaming_response.update(
CRITICALtests/api_resources/beta/threads/test_runs.py312 client.beta.threads.runs.with_raw_response.update(
CRITICALtests/api_resources/beta/threads/test_runs.py318 client.beta.threads.runs.with_raw_response.update(
CRITICALtests/api_resources/beta/threads/test_runs.py375 client.beta.threads.runs.with_raw_response.list(
CRITICALtests/api_resources/beta/threads/test_runs.py392 response = client.beta.threads.runs.with_raw_response.cancel(
CRITICALtests/api_resources/beta/threads/test_runs.py405 with client.beta.threads.runs.with_streaming_response.cancel(
CRITICALtests/api_resources/beta/threads/test_runs.py421 client.beta.threads.runs.with_raw_response.cancel(
CRITICALtests/api_resources/beta/threads/test_runs.py427 client.beta.threads.runs.with_raw_response.cancel(
CRITICALtests/api_resources/beta/threads/test_runs.py463 response = client.beta.threads.runs.with_raw_response.submit_tool_outputs(
CRITICALtests/api_resources/beta/threads/test_runs.py477 with client.beta.threads.runs.with_streaming_response.submit_tool_outputs(
CRITICALtests/api_resources/beta/threads/test_runs.py494 client.beta.threads.runs.with_raw_response.submit_tool_outputs(
1000 more matches not shown…
Unused Imports2607 hits · 2110 pts
SeverityFileLineSnippet
LOWtests/conftest.py3
LOWtests/test_module_client.py3
LOWtests/test_transform.py1
LOWtests/test_streaming.py1
LOWtests/utils.py1
LOWtests/test_send_queue.py3
LOWtests/test_required_args.py1
LOWtests/test_client.py3
LOWtests/test_client.py21
LOWtests/test_extract_files.py1
LOWtests/test_utils/test_typing.py1
LOWtests/test_utils/test_json.py1
LOWtests/test_utils/test_path.py1
LOWtests/lib/snapshots.py1
LOWtests/lib/test_pydantic.py1
LOWtests/lib/test_audio.py1
LOWtests/lib/utils.py1
LOWtests/lib/utils.py4
LOWtests/lib/utils.py4
LOWtests/lib/test_azure.py1
LOWtests/lib/test_assistants.py1
LOWtests/lib/chat/test_completions_streaming.py1
LOWtests/lib/chat/test_completions.py1
LOWtests/lib/responses/test_responses.py1
LOWtests/api_resources/test_moderations.py3
LOWtests/api_resources/test_images.py3
LOWtests/api_resources/test_embeddings.py3
LOWtests/api_resources/test_vector_stores.py3
LOWtests/api_resources/test_videos.py3
LOWtests/api_resources/test_realtime.py3
LOWtests/api_resources/test_webhooks.py3
LOWtests/api_resources/test_containers.py3
LOWtests/api_resources/test_files.py3
LOWtests/api_resources/test_responses.py3
LOWtests/api_resources/test_skills.py3
LOWtests/api_resources/test_models.py3
LOWtests/api_resources/test_completions.py3
LOWtests/api_resources/test_conversations.py3
LOWtests/api_resources/test_evals.py3
LOWtests/api_resources/test_uploads.py3
LOWtests/api_resources/test_batches.py3
LOWtests/api_resources/beta/test_realtime.py3
LOWtests/api_resources/beta/test_threads.py3
LOWtests/api_resources/beta/test_assistants.py3
LOWtests/api_resources/beta/chatkit/test_sessions.py3
LOWtests/api_resources/beta/chatkit/test_threads.py3
LOWtests/api_resources/beta/threads/test_runs.py3
LOWtests/api_resources/beta/threads/test_messages.py3
LOWtests/api_resources/beta/threads/runs/test_steps.py3
LOWtests/api_resources/vector_stores/test_file_batches.py3
LOWtests/api_resources/vector_stores/test_files.py3
LOWtests/api_resources/evals/test_runs.py3
LOWtests/api_resources/evals/runs/test_output_items.py3
LOWtests/api_resources/fine_tuning/test_jobs.py3
LOW…_resources/fine_tuning/checkpoints/test_permissions.py3
LOW…sts/api_resources/fine_tuning/jobs/test_checkpoints.py3
LOWtests/api_resources/fine_tuning/alpha/test_graders.py3
LOWtests/api_resources/chat/test_completions.py3
LOWtests/api_resources/chat/completions/test_messages.py3
LOWtests/api_resources/responses/test_input_items.py3
2547 more matches not shown…
Hyper-Verbose Identifiers1419 hits · 1196 pts
SeverityFileLineSnippet
LOWhelpers.md480def current_run_step_snapshot() -> RunStep | None
LOWtests/conftest.py26def pytest_collection_modifyitems(items: list[pytest.Function]) -> None:
LOWtests/test_module_client.py70def test_default_headers_option() -> None:
LOWtests/test_module_client.py79def test_default_query_option() -> None:
LOWtests/test_module_client.py119def test_only_api_key_results_in_openai_api() -> None:
LOWtests/test_module_client.py127def test_azure_api_key_env_without_api_version() -> None:
LOWtests/test_module_client.py139def test_azure_api_key_and_version_env() -> None:
LOWtests/test_module_client.py152def test_azure_api_key_version_and_endpoint_env() -> None:
LOWtests/test_module_client.py164def test_azure_azure_ad_token_version_and_endpoint_env() -> None:
LOWtests/test_module_client.py176def test_azure_azure_ad_token_provider_version_and_endpoint_env() -> None:
LOWtests/test_transform.py141async def test_includes_unknown_keys(use_async: bool) -> None:
LOWtests/test_transform.py159async def test_ignores_invalid_input(use_async: bool) -> None:
LOWtests/test_transform.py251async def test_datetime_custom_format(use_async: bool) -> None:
LOWtests/test_transform.py277async def test_pydantic_model_to_dictionary(use_async: bool) -> None:
LOWtests/test_transform.py284async def test_pydantic_empty_model(use_async: bool) -> None:
LOWtests/test_transform.py290async def test_pydantic_unknown_field(use_async: bool) -> None:
LOWtests/test_transform.py298async def test_pydantic_mismatched_types(use_async: bool) -> None:
LOWtests/test_transform.py310async def test_pydantic_mismatched_object_type(use_async: bool) -> None:
LOWtests/test_transform.py326async def test_pydantic_nested_objects(use_async: bool) -> None:
LOWtests/test_transform.py340async def test_pydantic_default_field(use_async: bool) -> None:
LOWtests/test_transform.py374async def test_iterable_of_dictionaries(use_async: bool) -> None:
LOWtests/test_response.py33def test_extract_response_type_direct_classes() -> None:
LOWtests/test_response.py39def test_extract_response_type_direct_class_missing_type_arg() -> None:
LOWtests/test_response.py47def test_extract_response_type_concrete_subclasses() -> None:
LOWtests/test_response.py53def test_extract_response_type_binary_response() -> None:
LOWtests/test_response.py61def test_response_parse_mismatched_basemodel(client: OpenAI) -> None:
LOWtests/test_response.py79async def test_async_response_parse_mismatched_basemodel(async_client: AsyncOpenAI) -> None:
LOWtests/test_response.py96def test_response_parse_custom_stream(client: OpenAI) -> None:
LOWtests/test_response.py111async def test_async_response_parse_custom_stream(async_client: AsyncOpenAI) -> None:
LOWtests/test_response.py130def test_response_parse_custom_model(client: OpenAI) -> None:
LOWtests/test_response.py146async def test_async_response_parse_custom_model(async_client: AsyncOpenAI) -> None:
LOWtests/test_response.py161def test_response_basemodel_request_id(client: OpenAI) -> None:
LOWtests/test_response.py185async def test_async_response_basemodel_request_id(client: OpenAI) -> None:
LOWtests/test_response.py206def test_response_parse_annotated_type(client: OpenAI) -> None:
LOWtests/test_response.py223async def test_async_response_parse_annotated_type(async_client: AsyncOpenAI) -> None:
LOWtests/test_response.py276async def test_async_response_parse_bool(client: AsyncOpenAI, content: str, expected: bool) -> None:
LOWtests/test_response.py295def test_response_parse_expect_model_union_non_json_content(client: OpenAI) -> None:
LOWtests/test_response.py312async def test_async_response_parse_expect_model_union_non_json_content(async_client: AsyncOpenAI) -> None:
LOWtests/test_websocket_connection_options.py5def test_submodule_alias_is_preserved() -> None:
LOWtests/test_websocket_connection_options.py12def test_public_types_alias_is_preserved() -> None:
LOWtests/test_websocket_connection_options.py16def test_beta_realtime_import_still_works_with_old_alias() -> None:
LOWtests/test_auth.py59def test_workload_identity_exchange_payload_and_cache() -> None:
LOWtests/test_auth.py120def test_workload_identity_exchange_error() -> None:
LOWtests/test_auth.py166def test_azure_managed_identity_token_provider() -> None:
LOWtests/test_auth.py178def test_gcp_id_token_provider() -> None:
LOWtests/test_streaming.py85async def test_multiple_events_with_data(sync: bool, client: OpenAI, async_client: AsyncOpenAI) -> None:
LOWtests/test_streaming.py109async def test_multiple_data_lines_with_empty_line(sync: bool, client: OpenAI, async_client: AsyncOpenAI) -> None:
LOWtests/test_streaming.py131async def test_data_json_escaped_double_new_line(sync: bool, client: OpenAI, async_client: AsyncOpenAI) -> None:
LOWtests/test_streaming.py166async def test_special_new_line_character(
LOWtests/test_streaming.py197async def test_multi_byte_character_multiple_chunks(
LOWtests/test_qs.py76def test_unknown_array_format() -> None:
LOWtests/test_files.py13def test_pathlib_includes_file_name() -> None:
LOWtests/test_files.py26async def test_async_pathlib_includes_file_name() -> None:
LOWtests/test_files.py33async def test_async_supports_anyio_path() -> None:
LOWtests/test_files.py55def assert_different_identities(obj1: object, obj2: object) -> None:
LOWtests/test_files.py61 def test_copies_top_level_dict(self) -> None:
LOWtests/test_files.py66 def test_file_value_is_same_reference(self) -> None:
LOWtests/test_files.py73 def test_list_popped_wholesale(self) -> None:
LOWtests/test_files.py82 def test_nested_array_path_copies_list_and_elements(self) -> None:
LOWtests/test_files.py94 def test_empty_paths_returns_same_object(self) -> None:
1359 more matches not shown…
Cross-Language Confusion19 hits · 95 pts
SeverityFileLineSnippet
HIGHtests/test_utils/test_json.py121 assert json_bytes == b'{"model":{"name":"Eve","email":null,"phone":null}}'
HIGHtests/test_utils/test_json.py126 assert json_bytes == b'{"model":{"name":"Frank","email":"frank@example.com","phone":null}}'
HIGHtests/lib/chat/test_completions.py44 '{"id": "chatcmpl-ABfvaueLEMLNYbT8YzpJxsmiQ6HSY", "object": "chat.completion", "created": 1727346142, "model
HIGHtests/lib/chat/test_completions.py114 '{"id": "chatcmpl-ABfvbtVnTu5DeC4EFnRYj8mtfOM99", "object": "chat.completion", "created": 1727346143, "model
HIGHtests/lib/chat/test_completions.py185 '{"id": "chatcmpl-ABfvcC8grKYsRkSoMp9CCAhbXAd0b", "object": "chat.completion", "created": 1727346144, "model
HIGHtests/lib/chat/test_completions.py260 '{"id": "chatcmpl-ABfvjIatz0zrZu50gRbMtlp0asZpz", "object": "chat.completion", "created": 1727346151, "model
HIGHtests/lib/chat/test_completions.py310 '{"id": "chatcmpl-ABfvp8qzboW92q8ONDF4DPHlI7ckC", "object": "chat.completion", "created": 1727346157, "model
HIGHtests/lib/chat/test_completions.py391 '{"id": "chatcmpl-ABfvqhz4uUUWsw8Ohw2Mp9B4sKKV8", "object": "chat.completion", "created": 1727346158, "model
HIGHtests/lib/chat/test_completions.py456 '{"id": "chatcmpl-ABfvtNiaTNUF6OymZUnEFc9lPq9p1", "object": "chat.completion", "created": 1727346161, "model
HIGHtests/lib/chat/test_completions.py542 '{"id": "chatcmpl-ABfvvX7eB1KsfeZj8VcF3z7G7SbaA", "object": "chat.completion", "created": 1727346163, "m
HIGHtests/lib/chat/test_completions.py569 '{"id": "chatcmpl-ABfvwoKVWPQj2UPlAcAKM7s40GsRx", "object": "chat.completion", "created": 1727346164, "model
HIGHtests/lib/chat/test_completions.py620 '{"id": "chatcmpl-ABfvx6Z4dchiW2nya1N8KMsHFrQRE", "object": "chat.completion", "created": 1727346165, "model
HIGHtests/lib/chat/test_completions.py694 '{"id": "chatcmpl-ABfvyvfNWKcl7Ohqos4UFrmMs1v4C", "object": "chat.completion", "created": 1727346166, "model
HIGHtests/lib/chat/test_completions.py777 '{"id": "chatcmpl-ABfvzdvCI6RaIkiEFNjqGXCSYnlzf", "object": "chat.completion", "created": 1727346167, "model
HIGHtests/lib/chat/test_completions.py855 '{"id": "chatcmpl-ABrDYCa8W1w66eUxKDO8TQF1m6trT", "object": "chat.completion", "created": 1727389540, "model
HIGHtests/lib/chat/test_completions.py932 '{"id": "chatcmpl-ABrDQWOiw0PK5JOsxl1D9ooeQgznq", "object": "chat.completion", "created": 1727389532, "model
HIGHtests/lib/responses/test_responses.py32 '{"id": "resp_689a0b2545288193953c892439b42e2800b2e36c65a1fd4b", "object": "response", "created_at": 1754925
HIGH…ta/chatkit/chat_session_chatkit_configuration_param.py42 When omitted, history is enabled by default with no limit on recent_threads (null).
HIGH…ta/chatkit/chat_session_chatkit_configuration_param.py75 (null).
Excessive Try-Catch Wrapping53 hits · 64 pts
SeverityFileLineSnippet
LOWREADME.md543 except Exception as e:
LOWREADME.md579 except Exception as e:
LOWexamples/image_stream.py52 except Exception as error:
MEDIUMexamples/image_stream.py53 print(f"Error generating image: {error}")
LOWscripts/utils/ruffen-docs.py42 except Exception as e:
LOWsrc/openai/_send_queue.py52 except Exception:
LOWsrc/openai/_send_queue.py69 except Exception:
LOWsrc/openai/_base_client.py424 except Exception:
LOWsrc/openai/_base_client.py861 except Exception:
LOWsrc/openai/_base_client.py1059 except Exception as err:
LOWsrc/openai/_base_client.py1471 except Exception:
LOWsrc/openai/_base_client.py1670 except Exception as err:
LOWsrc/openai/_base_client.py2103 except Exception:
LOWsrc/openai/_base_client.py2168 except Exception:
LOWsrc/openai/_base_client.py2175 except Exception:
LOWsrc/openai/_base_client.py2182 except Exception:
MEDIUMsrc/openai/_base_client.py2099def get_platform() -> Platform:
MEDIUMsrc/openai/_base_client.py2165def get_python_runtime() -> str:
MEDIUMsrc/openai/_base_client.py2172def get_python_version() -> str:
MEDIUMsrc/openai/_base_client.py2179def get_architecture() -> Arch:
LOWsrc/openai/_response.py247 except Exception as exc:
LOWsrc/openai/_legacy_response.py314 except Exception as exc:
LOWsrc/openai/_models.py622 except Exception:
LOWsrc/openai/_models.py651 except Exception:
LOWsrc/openai/_models.py696 except Exception:
LOWsrc/openai/_models.py702 except Exception:
LOWsrc/openai/_utils/_proxy.py51 except Exception:
LOWsrc/openai/_utils/_utils.py410 except Exception:
MEDIUMsrc/openai/_utils/_utils.py407def get_async_library() -> str:
LOWsrc/openai/auth/_workload.py62 except Exception as e:
LOWsrc/openai/auth/_workload.py122 except Exception as e:
LOWsrc/openai/auth/_workload.py166 except Exception as e:
MEDIUMsrc/openai/auth/_workload.py55def get_token() -> str:
MEDIUMsrc/openai/auth/_workload.py93def get_token() -> str:
MEDIUMsrc/openai/auth/_workload.py146def get_token() -> str:
LOWsrc/openai/resources/responses/responses.py3767 except Exception:
LOWsrc/openai/resources/responses/responses.py3831 except Exception:
LOWsrc/openai/resources/responses/responses.py3863 except Exception:
LOWsrc/openai/resources/responses/responses.py3877 except Exception:
LOWsrc/openai/resources/responses/responses.py4224 except Exception:
LOWsrc/openai/resources/responses/responses.py4286 except Exception:
LOWsrc/openai/resources/responses/responses.py4318 except Exception:
LOWsrc/openai/resources/responses/responses.py4328 except Exception:
LOWsrc/openai/resources/realtime/realtime.py356 except Exception:
LOWsrc/openai/resources/realtime/realtime.py419 except Exception:
LOWsrc/openai/resources/realtime/realtime.py451 except Exception:
LOWsrc/openai/resources/realtime/realtime.py465 except Exception:
LOWsrc/openai/resources/realtime/realtime.py836 except Exception:
LOWsrc/openai/resources/realtime/realtime.py897 except Exception:
LOWsrc/openai/resources/realtime/realtime.py929 except Exception:
LOWsrc/openai/resources/realtime/realtime.py939 except Exception:
LOWsrc/openai/lib/streaming/_assistants.py414 except Exception as exc:
LOWsrc/openai/lib/streaming/_assistants.py846 except Exception as exc:
Deep Nesting46 hits · 46 pts
SeverityFileLineSnippet
LOWtests/utils.py56
LOWtests/lib/test_audio.py19
LOWtests/lib/test_audio.py54
LOWexamples/image_stream.py11
LOWexamples/responses/websocket.py267
LOWexamples/realtime/realtime.py13
LOWexamples/realtime/azure_realtime.py15
LOWexamples/realtime/audio_util.py95
LOWsrc/openai/_base_client.py498
LOWsrc/openai/_streaming.py55
LOWsrc/openai/_streaming.py165
LOWsrc/openai/_streaming.py339
LOWsrc/openai/_qs.py65
LOWsrc/openai/_models.py588
LOWsrc/openai/_models.py757
LOWsrc/openai/_utils/_transform.py236
LOWsrc/openai/_utils/_transform.py402
LOWsrc/openai/types/responses/parsed_response.py113
LOWsrc/openai/types/responses/response.py310
LOWsrc/openai/resources/videos.py171
LOWsrc/openai/resources/videos.py750
LOWsrc/openai/resources/vector_stores/files.py360
LOWsrc/openai/resources/vector_stores/files.py814
LOWsrc/openai/resources/vector_stores/file_batches.py331
LOWsrc/openai/resources/vector_stores/file_batches.py719
LOWsrc/openai/resources/responses/responses.py3714
LOWsrc/openai/resources/responses/responses.py4171
LOWsrc/openai/resources/uploads/uploads.py414
LOWsrc/openai/resources/realtime/realtime.py303
LOWsrc/openai/resources/realtime/realtime.py783
LOWsrc/openai/resources/audio/translations.py366
LOWsrc/openai/resources/audio/transcriptions.py1002
LOWsrc/openai/lib/_validators.py451
LOWsrc/openai/lib/_validators.py640
LOWsrc/openai/lib/_parsing/_responses.py53
LOWsrc/openai/lib/_parsing/_completions.py86
LOWsrc/openai/lib/streaming/_deltas.py6
LOWsrc/openai/lib/streaming/_assistants.py980
LOWsrc/openai/lib/streaming/_assistants.py255
LOWsrc/openai/lib/streaming/_assistants.py687
LOWsrc/openai/lib/streaming/chat/_completions.py360
LOWsrc/openai/lib/streaming/chat/_completions.py493
LOWsrc/openai/lib/streaming/responses/_responses.py247
LOWsrc/openai/lib/streaming/responses/_responses.py325
LOWsrc/openai/helpers/local_audio_player.py104
LOWsrc/openai/helpers/local_audio_player.py119
Slop Phrases7 hits · 14 pts
SeverityFileLineSnippet
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, I
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 recommend
MEDIUMtests/lib/chat/test_completions_streaming.py1057 content="I'm unable to provide real-time weather updates. To get the current weather in San Francisco, I
MEDIUMtests/lib/chat/test_completions.py62 content="I'm unable to provide real-time weather updates. To get the current weather in San Francisco, I
MEDIUMexamples/streaming.py44 # In Python 3.10+ you can also use the `await anext(response)` builtin instead
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.
MEDIUM…enai/types/evals/runs/output_item_retrieve_response.py38 # To access properties that are not valid identifiers you can use `getattr`, e.g.
AI Slop Vocabulary4 hits · 6 pts
SeverityFileLineSnippet
LOWpyproject.toml187# it's fine to just use Pyright.
LOWsrc/openai/_response.py263 # If the API responds with content that isn't JSON then we just return
LOWsrc/openai/_legacy_response.py330 # If the API responds with content that isn't JSON then we just return
LOWsrc/openai/_models.py491 # If the type cannot be reconstructed, just return the validated list
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippet
HIGHsrc/openai/_utils/_path.py79Interpolate {name} placeholders in `template` from keyword arguments. Args: template: The template string c
Over-Commented Block4 hits · 4 pts
SeverityFileLineSnippet
LOWexamples/realtime/push_to_talk_app.py1#!/usr/bin/env uv run
LOWsrc/openai/_types.py101# method that uses `ResponseT` which would lead to an unacceptable
LOWsrc/openai/_client.py641 default_headers: Mapping[str, str] | None = None,
LOWsrc/openai/_models.py621 return validate_type(type_=cast("type[object]", original_type or type_), value=value)
Fake / Example Data2 hits · 3 pts
SeverityFileLineSnippet
LOWtests/test_utils/test_json.py98 address = Address(street="123 Main St")
LOWtests/test_utils/test_json.py102 assert json_bytes == b'{"user":{"name":"Diana","address":{"street":"123 Main St"}}}'
Self-Referential Comments2 hits · 2 pts
SeverityFileLineSnippet
MEDIUMsrc/openai/_base_client.py950 """This method is used as a callback for mutating the `Request` object
MEDIUMsrc/openai/_base_client.py1557 """This method is used as a callback for mutating the `Request` object
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippet
LOWtests/test_client.py82 def handle_request(