structured outputs for llms
This report presents the forensic synthetic code analysis of 567-labs/instructor, a Python project with 13,664 GitHub stars. SynthScan v2.0 examined 133,346 lines of code across 834 source files, recording 2229 pattern matches distributed across 25 syntactic categories. The overall adjusted score of 25.8 places this repository in the Moderate AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 2229 distinct pattern matches across 25 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | github_issue.md | 42 | def generate_anthropic_schema(model: Type[BaseModel]) -> dict[str, Any]: | CODE |
| LOW | tests/test_lazy_imports.py | 34 | def test_top_level_exports_load_lazily(): | STRING |
| LOW | tests/test_lazy_imports.py | 58 | def test_mode_export_stays_lightweight(): | STRING |
| LOW⚡ | tests/test_utils.py | 200 | def test_combine_system_messages_string_string(): | CODE |
| LOW⚡ | tests/test_utils.py | 207 | def test_combine_system_messages_list_list(): | CODE |
| LOW⚡ | tests/test_utils.py | 217 | def test_combine_system_messages_string_list(): | CODE |
| LOW⚡ | tests/test_utils.py | 227 | def test_combine_system_messages_list_string(): | CODE |
| LOW⚡ | tests/test_utils.py | 237 | def test_update_total_usage_preserves_openai_usage_subclass(): | CODE |
| LOW⚡ | tests/test_utils.py | 267 | def test_combine_system_messages_none_string(): | CODE |
| LOW⚡ | tests/test_utils.py | 274 | def test_combine_system_messages_none_list(): | CODE |
| LOW⚡ | tests/test_utils.py | 281 | def test_combine_system_messages_invalid_type(): | CODE |
| LOW⚡ | tests/test_utils.py | 286 | def test_extract_system_messages(): | CODE |
| LOW | tests/test_utils.py | 22 | def test_extract_json_from_codeblock(): | CODE |
| LOW | tests/test_utils.py | 300 | def test_extract_system_messages_no_system(): | CODE |
| LOW | tests/test_utils.py | 309 | def test_combine_system_messages_with_cache_control(): | CODE |
| LOW | tests/test_utils.py | 338 | def test_combine_system_messages_string_to_cache_control(): | CODE |
| LOW | tests/test_utils.py | 361 | def test_extract_system_messages_with_cache_control(): | CODE |
| LOW | tests/test_utils.py | 390 | def test_combine_system_messages_preserve_cache_control(): | CODE |
| LOW | tests/test_utils.py | 429 | def test_provider_enum_covers_supported_providers(): | CODE |
| LOW | tests/test_utils.py | 437 | def test_get_provider_matches_supported_providers(): | CODE |
| LOW | tests/test_utils.py | 36 | def test_extract_json_from_codeblock_no_end(): | STRING |
| LOW | tests/test_utils.py | 53 | def test_extract_json_from_codeblock_no_start(): | STRING |
| LOW | tests/test_utils.py | 142 | def test_merge_consecutive_messages(): | STRING |
| LOW | tests/test_utils.py | 162 | def test_merge_consecutive_messages_empty(): | STRING |
| LOW | tests/test_utils.py | 168 | def test_merge_consecutive_messages_single(): | STRING |
| LOW | tests/test_genai_reask.py | 16 | def test_reask_genai_tools_preserves_thought_signature(): | CODE |
| LOW | tests/test_genai_reask.py | 39 | def test_reask_genai_tools_finds_function_call_part_when_not_first(): | CODE |
| LOW | tests/test_genai_reask.py | 61 | def test_reask_genai_tools_handles_none_response(): | CODE |
| LOW | tests/test_genai_reask.py | 71 | def test_reask_genai_tools_falls_back_when_no_function_call(): | CODE |
| LOW | tests/test_xai_optional_dependency.py | 5 | def test_from_provider_xai_requires_optional_extra(monkeypatch): | CODE |
| LOW | tests/test_xai_optional_dependency.py | 25 | def test_direct_from_xai_has_clear_error_when_sdk_missing(monkeypatch): | CODE |
| LOW | tests/test_batch_in_memory.py | 24 | def test_save_to_bytesio_openai(self): | CODE |
| LOW | tests/test_batch_in_memory.py | 52 | def test_save_to_bytesio_anthropic(self): | CODE |
| LOW | tests/test_batch_in_memory.py | 78 | def test_save_to_file_still_works(self): | CODE |
| LOW | tests/test_batch_in_memory.py | 111 | def test_multiple_requests_in_buffer(self): | CODE |
| LOW | tests/test_batch_in_memory.py | 137 | def test_invalid_buffer_type_raises_error(self): | CODE |
| LOW | tests/test_batch_in_memory.py | 158 | def test_openai_provider_accepts_bytesio(self): | CODE |
| LOW⚡ | tests/test_batch_in_memory.py | 187 | def test_anthropic_provider_accepts_bytesio(self): | CODE |
| LOW | tests/test_batch_in_memory.py | 214 | def test_provider_invalid_type_raises_error(self): | CODE |
| LOW | tests/test_openai_responses_tools.py | 28 | def test_responses_tools_preserves_function_description() -> None: | CODE |
| LOW | tests/test_openai_responses_tools.py | 38 | def test_responses_tools_sets_text_format() -> None: | CODE |
| LOW | tests/test_openai_responses_tools.py | 49 | def test_responses_tools_overrides_conflicting_text_format() -> None: | CODE |
| LOW | tests/test_openai_responses_tools.py | 72 | def test_responses_tools_preserves_matching_text_format() -> None: | CODE |
| LOW | tests/test_openai_responses_tools.py | 90 | def test_responses_tools_none_model_no_text() -> None: | CODE |
| LOW | tests/test_openai_responses_tools.py | 108 | def test_reask_responses_tools_empty_args_message() -> None: | CODE |
| LOW | tests/test_openai_responses_tools.py | 122 | def test_reask_responses_tools_nonempty_args_message() -> None: | CODE |
| LOW⚡ | tests/test_openai_responses_tools.py | 135 | def test_reask_responses_tools_none_arguments() -> None: | CODE |
| LOW⚡ | tests/test_openai_responses_tools.py | 144 | def test_responses_tools_overrides_text_type_format() -> None: | CODE |
| LOW⚡ | tests/test_openai_responses_tools.py | 154 | def test_parse_response_warns_on_empty_args(caplog) -> None: | CODE |
| LOW | tests/test_incomplete_output_exception.py | 38 | def test_incomplete_output_exception_is_catchable_sync(): | CODE |
| LOW | tests/test_incomplete_output_exception.py | 56 | def test_incomplete_output_not_wrapped_in_instructor_retry_exception_sync(): | CODE |
| LOW | tests/test_incomplete_output_exception.py | 74 | def test_incomplete_output_exception_with_max_retries_zero(): | CODE |
| LOW | tests/test_incomplete_output_exception.py | 78 | def _raise_incomplete_and_count(*_args, **_kwargs): | CODE |
| LOW | tests/test_incomplete_output_exception.py | 102 | async def test_incomplete_output_exception_is_catchable_async(): | CODE |
| LOW | tests/test_update_total_usage.py | 31 | def test_update_total_usage_preserves_openai_usage_subclass() -> None: | CODE |
| LOW⚡ | tests/test_genai_config_merging.py | 24 | def test_update_genai_kwargs_thinking_config_from_config_object(): | CODE |
| LOW⚡ | tests/test_genai_config_merging.py | 402 | def test_update_genai_kwargs_config_dict_labels(): | CODE |
| LOW⚡ | tests/test_genai_config_merging.py | 412 | def test_update_genai_kwargs_config_dict_cached_content(): | CODE |
| LOW⚡ | tests/test_genai_config_merging.py | 422 | def test_update_genai_kwargs_config_dict_thinking_config(): | CODE |
| LOW | tests/test_genai_config_merging.py | 57 | def test_update_genai_kwargs_thinking_config_kwarg_priority(): | CODE |
| 932 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/llm/test_new_client.py | 0 | \ given the following text, create a group object for 'the beatles' band text: the beatles were an english rock band for | STRING |
| HIGH | docs/integrations/cohere.md | 0 | \ given the following text, create a group object for 'the beatles' band text: the beatles were an english rock band for | STRING |
| HIGH | examples/cohere/cohere.py | 0 | \ given the following text, create a group object for 'the beatles' band text: the beatles were an english rock band for | STRING |
| HIGH | tests/llm/test_writer/evals/test_entities.py | 0 | sample legal contract agreement contract this agreement is made and entered into on 2020-01-01 by and between company a | STRING |
| HIGH | docs/examples/entity_resolution.md | 0 | sample legal contract agreement contract this agreement is made and entered into on 2020-01-01 by and between company a | STRING |
| HIGH | examples/resolving-complex-entities/run.py | 0 | sample legal contract agreement contract this agreement is made and entered into on 2020-01-01 by and between company a | STRING |
| HIGH | tests/v2/test_xai_handlers.py | 0 | test prepare_request returns unchanged kwargs when response_model is none. | STRING |
| HIGH | tests/v2/test_mistral_handlers.py | 0 | test prepare_request returns unchanged kwargs when response_model is none. | STRING |
| HIGH | tests/v2/test_cohere_handlers.py | 0 | test prepare_request returns unchanged kwargs when response_model is none. | STRING |
| HIGH | tests/v2/test_xai_handlers.py | 0 | test prepare_request doesn't modify original kwargs. | STRING |
| HIGH | tests/v2/test_mistral_handlers.py | 0 | test prepare_request doesn't modify original kwargs. | STRING |
| HIGH | tests/v2/test_cohere_handlers.py | 0 | test prepare_request doesn't modify original kwargs. | STRING |
| HIGH | docs/blog/posts/writer-support.md | 0 | in our recent online meeting, participants from various backgrounds joined to discuss the upcoming tech conference. the | STRING |
| HIGH | docs/examples/partial_streaming.md | 0 | in our recent online meeting, participants from various backgrounds joined to discuss the upcoming tech conference. the | STRING |
| HIGH | docs/concepts/partial.md | 0 | in our recent online meeting, participants from various backgrounds joined to discuss the upcoming tech conference. the | STRING |
| HIGH | docs/blog/posts/introducing-structured-outputs.md | 0 | in our recent online meeting, participants from various backgrounds joined to discuss the upcoming tech conference. the | STRING |
| HIGH | docs/blog/posts/matching-language.md | 0 | լեզվական մոդելները վերջին տարիներին դարձել են ավելի հարուստ և կատարյալ, հնարավորություն ընձեռելով ստեղծել սահուն և բնակա | STRING |
| HIGH | examples/match_language/run_v2.py | 0 | լեզվական մոդելները վերջին տարիներին դարձել են ավելի հարուստ և կատարյալ, հնարավորություն ընձեռելով ստեղծել սահուն և բնակա | STRING |
| HIGH | examples/match_language/run_v1.py | 0 | լեզվական մոդելները վերջին տարիներին դարձել են ավելի հարուստ և կատարյալ, հնարավորություն ընձեռելով ստեղծել սահուն և բնակա | STRING |
| HIGH | docs/blog/posts/logfire.md | 0 | perform single-label classification on the input text. | STRING |
| HIGH | docs/examples/single_classification.md | 0 | perform single-label classification on the input text. | STRING |
| HIGH | docs/examples/classification.md | 0 | perform single-label classification on the input text. | STRING |
| HIGH | examples/logfire/classify.py | 0 | perform single-label classification on the input text. | STRING |
| HIGH | docs/blog/posts/langsmith.md | 0 | predict the type of question that is being asked. here are some tips on how to predict the question type: contact: searc | STRING |
| HIGH | docs/examples/batch_classification_langsmith.md | 0 | predict the type of question that is being asked. here are some tips on how to predict the question type: contact: searc | STRING |
| HIGH | examples/batch-classification/run-cache.py | 0 | predict the type of question that is being asked. here are some tips on how to predict the question type: contact: searc | STRING |
| HIGH | examples/batch-classification/run.py | 0 | predict the type of question that is being asked. here are some tips on how to predict the question type: contact: searc | STRING |
| HIGH | examples/batch-classification/run_langsmith.py | 0 | predict the type of question that is being asked. here are some tips on how to predict the question type: contact: searc | STRING |
| HIGH | docs/integrations/deepseek.md | 0 | extract: jason is 25 years old. he lives at 123 main st, new york, usa and has a summer house at 456 beach rd, miami, us | STRING |
| HIGH | docs/integrations/fireworks.md | 0 | extract: jason is 25 years old. he lives at 123 main st, new york, usa and has a summer house at 456 beach rd, miami, us | STRING |
| HIGH | docs/integrations/writer.md | 0 | extract: jason is 25 years old. he lives at 123 main st, new york, usa and has a summer house at 456 beach rd, miami, us | STRING |
| HIGH | docs/integrations/xai.md | 0 | extract: jason is 25 years old. he lives at 123 main st, new york, usa and has a summer house at 456 beach rd, miami, us | STRING |
| HIGH | docs/integrations/groq.md | 0 | extract: jason is 25 years old. he lives at 123 main st, new york, usa and has a summer house at 456 beach rd, miami, us | STRING |
| HIGH | docs/integrations/openai.md | 0 | extract: jason is 25 years old. he lives at 123 main st, new york, usa and has a summer house at 456 beach rd, miami, us | STRING |
| HIGH | docs/integrations/bedrock.md | 0 | extract: jason is 25 years old. he lives at 123 main st, new york, usa and has a summer house at 456 beach rd, miami, us | STRING |
| HIGH | docs/integrations/mistral.md | 0 | extract: jason is 25 years old. he lives at 123 main st, new york, usa and has a summer house at 456 beach rd, miami, us | STRING |
| HIGH | docs/integrations/cortex.md | 0 | extract: jason is 25 years old. he lives at 123 main st, new york, usa and has a summer house at 456 beach rd, miami, us | STRING |
| HIGH | docs/integrations/cerebras.md | 0 | extract: jason is 25 years old. he lives at 123 main st, new york, usa and has a summer house at 456 beach rd, miami, us | STRING |
| HIGH | docs/integrations/google.md | 0 | extract: jason is 25 years old. he lives at 123 main st, new york, usa and has a summer house at 456 beach rd, miami, us | STRING |
| HIGH | docs/integrations/perplexity.md | 0 | extract: jason is 25 years old. he lives at 123 main st, new york, usa and has a summer house at 456 beach rd, miami, us | STRING |
| HIGH | docs/integrations/openrouter.md | 0 | extract: jason is 25 years old. he lives at 123 main st, new york, usa and has a summer house at 456 beach rd, miami, us | STRING |
| HIGH | docs/integrations/deepseek.md | 0 | extract users: 1. jason is 25 years old 2. sarah is 30 years old 3. mike is 28 years old | STRING |
| HIGH | docs/integrations/fireworks.md | 0 | extract users: 1. jason is 25 years old 2. sarah is 30 years old 3. mike is 28 years old | STRING |
| HIGH | docs/integrations/anthropic.md | 0 | extract users: 1. jason is 25 years old 2. sarah is 30 years old 3. mike is 28 years old | STRING |
| HIGH | docs/integrations/openai.md | 0 | extract users: 1. jason is 25 years old 2. sarah is 30 years old 3. mike is 28 years old | STRING |
| HIGH | docs/integrations/google.md | 0 | extract users: 1. jason is 25 years old 2. sarah is 30 years old 3. mike is 28 years old | STRING |
| HIGH | docs/integrations/azure.md | 0 | extract users: 1. jason is 25 years old 2. sarah is 30 years old 3. mike is 28 years old | STRING |
| HIGH | docs/integrations/ollama.md | 0 | { "name": "harry james potter", "age": 37, "fact": [ "he is the chosen one.", "he has a lightning-shaped scar on his for | STRING |
| HIGH | docs/examples/ollama.md | 0 | { "name": "harry james potter", "age": 37, "fact": [ "he is the chosen one.", "he has a lightning-shaped scar on his for | STRING |
| HIGH | examples/proscons/run.py | 0 | { "name": "harry james potter", "age": 37, "fact": [ "he is the chosen one.", "he has a lightning-shaped scar on his for | STRING |
| HIGH | docs/examples/pandas_df.md | 0 | the markdown representation of the table, each one should be tidy, do not try to join tables that should be separate | STRING |
| HIGH | docs/examples/tables_from_vision.md | 0 | the markdown representation of the table, each one should be tidy, do not try to join tables that should be separate | STRING |
| HIGH | docs/concepts/types.md | 0 | the markdown representation of the table, each one should be tidy, do not try to join tables that should be separate | STRING |
| HIGH | examples/extract-table/run_vision_org_table.py | 0 | the markdown representation of the table, each one should be tidy, do not try to join tables that should be separate | STRING |
| HIGH | examples/extract-table/run_vision_langsmith.py | 0 | the markdown representation of the table, each one should be tidy, do not try to join tables that should be separate | STRING |
| HIGH | examples/extract-table/run_vision.py | 0 | the markdown representation of the table, each one should be tidy, do not try to join tables that should be separate | STRING |
| HIGH | examples/vision/run_table.py | 0 | the markdown representation of the table, each one should be tidy, do not try to join tables that should be separate | STRING |
| HIGH | instructor/v2/providers/gemini/utils.py | 0 | as a genius expert, your task is to understand the content and provide the parsed objects in json that match the followi | STRING |
| HIGH | instructor/v2/providers/writer/handlers.py | 0 | as a genius expert, your task is to understand the content and provide the parsed objects in json that match the followi | STRING |
| HIGH | instructor/v2/providers/mistral/handlers.py | 0 | as a genius expert, your task is to understand the content and provide the parsed objects in json that match the followi | STRING |
| 19 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_streaming_reasoning_events.py | 10 | CODE | |
| LOW | tests/test_import_lazy_openai.py | 3 | CODE | |
| LOW | tests/test_batch_processor_coverage.py | 3 | CODE | |
| LOW | tests/llm/test_vertexai/conftest.py | 11 | CODE | |
| LOW | tests/llm/test_gemini/conftest.py | 14 | CODE | |
| LOW | tests/llm/test_core_providers/conftest.py | 5 | CODE | |
| LOW | tests/llm/test_core_providers/conftest.py | 5 | CODE | |
| LOW | tests/llm/test_bedrock/test_openai_image_conversion.py | 1 | CODE | |
| LOW | tests/llm/test_bedrock/conftest.py | 1 | CODE | |
| LOW | …ts/llm/test_bedrock/test_bedrock_native_passthrough.py | 1 | CODE | |
| LOW | tests/llm/test_bedrock/test_prepare_kwargs.py | 1 | CODE | |
| LOW | tests/llm/test_bedrock/test_normalize.py | 1 | CODE | |
| LOW | tests/llm/test_writer/conftest.py | 8 | CODE | |
| LOW | tests/processing/test_list_response_wrapper.py | 1 | CODE | |
| LOW | tests/providers/test_auto_client.py | 1 | CODE | |
| LOW | tests/docs/conftest.py | 1 | CODE | |
| LOW | tests/docs/_example_groups.py | 1 | CODE | |
| LOW | tests/docs/_concept_groups.py | 1 | CODE | |
| LOW | tests/typing/test_public_surface.py | 1 | CODE | |
| LOW | tests/typing/test_installed_package.py | 1 | CODE | |
| LOW | tests/v2/test_issue_2374.py | 1 | CODE | |
| LOW | tests/v2/test_xai_client.py | 7 | CODE | |
| LOW | tests/v2/test_auto_client_deterministic.py | 1 | CODE | |
| LOW | tests/v2/test_gemini_utils_deterministic.py | 1 | CODE | |
| LOW | tests/v2/test_handler_registration_unified.py | 7 | CODE | |
| LOW | tests/v2/test_anthropic_handlers.py | 7 | CODE | |
| LOW | tests/v2/test_genai_integration.py | 1 | CODE | |
| LOW | tests/v2/test_openai_streaming.py | 1 | CODE | |
| LOW | tests/v2/test_xai_handlers.py | 6 | CODE | |
| LOW | tests/v2/test_handlers_parametrized.py | 7 | CODE | |
| LOW | tests/v2/_fake_genai.py | 3 | CODE | |
| LOW | tests/v2/test_citation.py | 8 | CODE | |
| LOW | tests/v2/test_vertexai_runtime.py | 1 | CODE | |
| LOW | tests/v2/test_mode_normalization.py | 1 | CODE | |
| LOW | tests/v2/test_genai_multimodal_runtime.py | 1 | CODE | |
| LOW | tests/v2/test_client_unified.py | 7 | CODE | |
| LOW | tests/v2/test_legacy_provider_compat.py | 1 | CODE | |
| LOW | tests/v2/test_genai_handlers_deterministic.py | 1 | CODE | |
| LOW | tests/v2/test_core_multimodal_runtime.py | 1 | CODE | |
| LOW | tests/v2/test_core_provider_dispatch.py | 3 | CODE | |
| LOW | tests/v2/test_openai_compat_handlers.py | 3 | CODE | |
| LOW | tests/v2/test_provider_modes.py | 7 | CODE | |
| LOW | tests/v2/test_optional_dependency_imports.py | 1 | CODE | |
| LOW | tests/v2/provider_matrix.py | 3 | CODE | |
| LOW | tests/v2/test_response_schema_compat.py | 3 | CODE | |
| LOW | tests/v2/test_gemini_json_messages.py | 1 | CODE | |
| LOW | tests/v2/test_writer_client.py | 3 | CODE | |
| LOW | tests/v2/test_messages_not_mutated.py | 29 | CODE | |
| LOW | tests/v2/test_bedrock_client.py | 3 | CODE | |
| LOW | tests/v2/test_bedrock_handlers.py | 3 | CODE | |
| LOW | tests/v2/test_writer_handlers.py | 3 | CODE | |
| LOW | tests/v2/test_json_helpers.py | 1 | CODE | |
| LOW | tests/v2/test_iterable_streaming.py | 1 | CODE | |
| LOW | tests/v2/test_provider_specs.py | 3 | CODE | |
| LOW | tests/v2/test_mistral_handlers.py | 7 | CODE | |
| LOW | tests/v2/test_retry_runtime.py | 1 | CODE | |
| LOW | tests/v2/test_cohere_handlers.py | 7 | CODE | |
| LOW | examples/parallel/run.py | 1 | CODE | |
| LOW | examples/codegen-from-schema/models.py | 5 | CODE | |
| LOW | examples/fizzbuzz/run.py | 1 | CODE | |
| 325 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_streaming_reasoning_events.py | 21 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_streaming_reasoning_events.py | 23 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_streaming_reasoning_events.py | 53 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_streaming_reasoning_events.py | 56 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_streaming_reasoning_events.py | 81 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_streaming_reasoning_events.py | 83 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_streaming_reasoning_events.py | 160 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_streaming_reasoning_events.py | 162 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/v2/test_xai_client.py | 21 | # ============================================================================ | COMMENT |
| MEDIUM | tests/v2/test_xai_client.py | 23 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_xai_client.py | 187 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_xai_client.py | 189 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_xai_client.py | 195 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_xai_client.py | 197 | # ============================================================================ | COMMENT |
| MEDIUM | tests/v2/test_handler_registration_unified.py | 39 | # ============================================================================ | COMMENT |
| MEDIUM | tests/v2/test_handler_registration_unified.py | 41 | # ============================================================================ | COMMENT |
| MEDIUM | tests/v2/test_handler_registration_unified.py | 95 | # ============================================================================ | COMMENT |
| MEDIUM | tests/v2/test_handler_registration_unified.py | 97 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_handler_registration_unified.py | 170 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_handler_registration_unified.py | 172 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_xai_handlers.py | 366 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_xai_handlers.py | 368 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_xai_handlers.py | 373 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_xai_handlers.py | 375 | # ============================================================================ | COMMENT |
| MEDIUM | tests/v2/test_xai_handlers.py | 51 | # ============================================================================ | COMMENT |
| MEDIUM | tests/v2/test_xai_handlers.py | 53 | # ============================================================================ | COMMENT |
| MEDIUM | tests/v2/test_xai_handlers.py | 179 | # ============================================================================ | COMMENT |
| MEDIUM | tests/v2/test_xai_handlers.py | 181 | # ============================================================================ | COMMENT |
| MEDIUM | tests/v2/test_xai_handlers.py | 263 | # ============================================================================ | COMMENT |
| MEDIUM | tests/v2/test_xai_handlers.py | 265 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_client_unified.py | 150 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_client_unified.py | 152 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_client_unified.py | 203 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_client_unified.py | 205 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_client_unified.py | 229 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_client_unified.py | 231 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_client_unified.py | 266 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_client_unified.py | 268 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_client_unified.py | 304 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_client_unified.py | 306 | # ============================================================================ | COMMENT |
| MEDIUM | tests/v2/test_client_unified.py | 348 | # ============================================================================ | COMMENT |
| MEDIUM | tests/v2/test_client_unified.py | 350 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_mistral_handlers.py | 340 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_mistral_handlers.py | 342 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_mistral_handlers.py | 439 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_mistral_handlers.py | 441 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_mistral_handlers.py | 446 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_mistral_handlers.py | 448 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_mistral_handlers.py | 487 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_mistral_handlers.py | 489 | # ============================================================================ | COMMENT |
| MEDIUM | tests/v2/test_mistral_handlers.py | 101 | # ============================================================================ | COMMENT |
| MEDIUM | tests/v2/test_mistral_handlers.py | 103 | # ============================================================================ | COMMENT |
| MEDIUM | tests/v2/test_mistral_handlers.py | 278 | # ============================================================================ | COMMENT |
| MEDIUM | tests/v2/test_mistral_handlers.py | 280 | # ============================================================================ | COMMENT |
| MEDIUM | tests/v2/test_mistral_handlers.py | 563 | # ============================================================================ | COMMENT |
| MEDIUM | tests/v2/test_mistral_handlers.py | 565 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_cohere_handlers.py | 451 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_cohere_handlers.py | 453 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_cohere_handlers.py | 458 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/v2/test_cohere_handlers.py | 460 | # ============================================================================ | COMMENT |
| 28 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | tests/test_xai_optional_dependency.py | 8 | from instructor.core.exceptions import ConfigurationError | CODE |
| CRITICAL | tests/llm/test_vertexai/test_deprecated_async.py | 5 | from instructor.core.exceptions import ConfigurationError | CODE |
| CRITICAL⚡ | tests/providers/test_auto_client.py | 230 | from instructor.core.exceptions import ConfigurationError | CODE |
| CRITICAL⚡ | tests/providers/test_auto_client.py | 239 | from instructor.core.exceptions import ConfigurationError | CODE |
| CRITICAL | tests/providers/test_auto_client.py | 453 | from instructor.core.exceptions import ConfigurationError | CODE |
| CRITICAL | tests/providers/test_auto_client.py | 474 | from instructor.core.exceptions import ConfigurationError | CODE |
| CRITICAL⚡ | tests/v2/test_xai_client.py | 210 | from instructor.core.exceptions import ClientError | CODE |
| CRITICAL | tests/v2/test_client_unified.py | 332 | from instructor.core.exceptions import ClientError | CODE |
| CRITICAL⚡ | tests/v2/test_bedrock_client.py | 31 | from instructor.core.exceptions import ClientError | CODE |
| CRITICAL⚡ | tests/v2/test_bedrock_client.py | 44 | from instructor.core.exceptions import ClientError | CODE |
| CRITICAL⚡ | tests/v2/test_bedrock_client.py | 58 | from instructor.core.exceptions import ModeError | CODE |
| CRITICAL⚡ | tests/v2/test_cohere_handlers.py | 644 | from instructor.core.exceptions import ResponseParsingError | CODE |
| CRITICAL | docs/concepts/error_handling.md | 92 | from instructor.core.exceptions import ValidationError | CODE |
| CRITICAL | docs/concepts/error_handling.md | 123 | from instructor.core.exceptions import ConfigurationError, ModeError | CODE |
| CRITICAL | docs/concepts/error_handling.md | 190 | from instructor.core.exceptions import InstructorError | CODE |
| CRITICAL | docs/concepts/error_handling.md | 214 | from instructor.core.exceptions import ValidationError, InstructorRetryException | CODE |
| CRITICAL | docs/concepts/error_handling.md | 258 | from instructor.core.exceptions import ResponseParsingError | CODE |
| CRITICAL | docs/concepts/error_handling.md | 293 | from instructor.core.exceptions import ValidationError | CODE |
| CRITICAL | docs/concepts/from_provider.md | 221 | from instructor.core.exceptions import ConfigurationError | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/test_batch_in_memory.py | 183 | except Exception as exc_info: | CODE |
| LOW | tests/test_batch_in_memory.py | 210 | except Exception as exc_info: | CODE |
| LOW⚡ | tests/test_openai_responses_tools.py | 163 | except Exception: | CODE |
| LOW | tests/llm/test_vertexai/conftest.py | 38 | except Exception: | CODE |
| LOW | tests/llm/test_anthropic/test_reasoning.py | 29 | except Exception as e: | CODE |
| LOW | tests/processing/test_function_calls.py | 295 | except Exception as e: | CODE |
| LOW⚡ | tests/providers/test_auto_client.py | 184 | except Exception as e: | CODE |
| LOW⚡ | tests/providers/test_auto_client.py | 195 | except Exception as e: | CODE |
| LOW⚡ | tests/providers/test_auto_client.py | 211 | except Exception as e: | CODE |
| LOW⚡ | tests/providers/test_auto_client.py | 222 | except Exception as e: | CODE |
| LOW | tests/v2/test_issue_2374.py | 49 | except Exception: | CODE |
| LOW | tests/v2/test_issue_2374.py | 67 | except Exception: | CODE |
| MEDIUM | docs/index.md | 316 | client.on("completion:error", lambda e: print(f"Error: {e}")) | CODE |
| LOW | docs/debugging.md | 127 | except Exception as err: | CODE |
| LOW | docs/learning/validation/retry_mechanisms.md | 190 | except Exception as e: | CODE |
| LOW | docs/blog/posts/caching.md | 845 | except Exception as e: | CODE |
| LOW | docs/blog/posts/caching.md | 854 | except Exception as e: | CODE |
| MEDIUM | docs/blog/posts/caching.md | 840 | def wrapper(*args, **kwargs): | CODE |
| LOW | docs/blog/posts/youtube-transcripts.md | 82 | except Exception as e: | CODE |
| MEDIUM | docs/blog/posts/youtube-transcripts.md | 83 | print(f"Error fetching transcript: {e}") | CODE |
| LOW | docs/blog/posts/youtube-transcripts.md | 120 | except Exception as e: | CODE |
| MEDIUM | docs/blog/posts/youtube-transcripts.md | 121 | print(f"Error fetching transcript: {e}") | CODE |
| LOW | …s/blog/posts/semantic-validation-structured-outputs.md | 242 | except Exception as e: | STRING |
| LOW | docs/blog/posts/introducing-structured-outputs.md | 76 | except Exception as e: | CODE |
| MEDIUM | docs/blog/posts/string-based-init.md | 137 | print("Error: Install the anthropic package first") | CODE |
| LOW | docs/integrations/xai.md | 206 | except Exception as e: | STRING |
| MEDIUM | docs/integrations/xai.md | 207 | print(f"Error: {e}") | STRING |
| LOW | docs/integrations/anthropic.md | 97 | except Exception as e: | CODE |
| LOW | docs/integrations/anthropic.md | 387 | except Exception as e: | CODE |
| MEDIUM | docs/integrations/anthropic.md | 388 | print(f"Error during streaming: {e}") | CODE |
| LOW | docs/integrations/anthropic.md | 448 | except Exception as e: | STRING |
| MEDIUM | docs/integrations/anthropic.md | 449 | print(f"Error during iteration: {e}") | STRING |
| LOW | docs/integrations/anthropic.md | 549 | except Exception as e: | CODE |
| MEDIUM | docs/integrations/anthropic.md | 550 | print(f"Error: {e}") | CODE |
| LOW | docs/integrations/anthropic.md | 623 | except Exception as e: | CODE |
| MEDIUM | docs/integrations/anthropic.md | 624 | print(f"Error during image analysis: {e}") | CODE |
| LOW | docs/examples/batch_in_memory.md | 269 | except Exception as e: | CODE |
| MEDIUM | docs/examples/batch_in_memory.md | 270 | print(f"Error during batch processing: {e}") | CODE |
| LOW | docs/examples/self_critique.md | 95 | except Exception as e: | CODE |
| LOW | docs/examples/extract_contact_info.md | 91 | except Exception as e: | CODE |
| LOW | docs/examples/sqlmodel.md | 470 | except Exception as e: | CODE |
| LOW | docs/examples/sqlmodel.md | 556 | except Exception as e: | CODE |
| LOW | docs/examples/moderation.md | 39 | except Exception as e: | CODE |
| LOW | docs/examples/moderation.md | 50 | except Exception as e: | CODE |
| MEDIUM | docs/concepts/unions.md | 240 | print(f"Error: {result.message}") | CODE |
| MEDIUM | docs/concepts/unions.md | 327 | print(f"Error: {response.message}") | CODE |
| MEDIUM | docs/concepts/error_handling.md | 275 | print(f"Error: {e}") | CODE |
| LOW | docs/concepts/semantic_validation.md | 153 | except Exception as e: | CODE |
| LOW | docs/concepts/retrying.md | 41 | except Exception as e: | CODE |
| MEDIUM | docs/concepts/hooks.md | 101 | print(f"Error #{self.count}: {type(error).__name__}: {error}") | CODE |
| LOW | docs/concepts/hooks.md | 122 | except Exception as e: | CODE |
| MEDIUM | docs/concepts/batch.md | 182 | print(f"Error: {result.error_message}") | CODE |
| LOW | docs/templates/provider_template.md | 74 | except Exception as e: | CODE |
| MEDIUM | docs/templates/provider_template.md | 75 | print(f"Error: {e}") | CODE |
| LOW | docs/templates/provider_template.md | 130 | except Exception as e: | CODE |
| MEDIUM | docs/templates/provider_template.md | 131 | print(f"Error during extraction: {e}") | CODE |
| LOW | examples/classification/classifiy_with_validation.py | 169 | except Exception as e: | CODE |
| MEDIUM | examples/open_source_examples/openrouter.py | 60 | print(f"Error: {user.error}") | CODE |
| MEDIUM | examples/open_source_examples/perplexity.py | 73 | print(f"Error: {user.error}") | CODE |
| LOW | examples/open_source_examples/runpod.py | 60 | except Exception as e: | CODE |
| 134 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | docs/cli/index.md | 51 | export OPENAI_API_KEY="your-api-key-here" | CODE |
| HIGH | docs/blog/posts/google-openai-client.md | 37 | base_url="https://generativelanguage.googleapis.com/v1beta/", api_key="YOUR_API_KEY" | CODE |
| HIGH | …roducing-structured-outputs-with-cerebras-inference.md | 59 | export CEREBRAS_API_KEY=<your-api-key> | CODE |
| HIGH | docs/blog/posts/open_source.md | 144 | export GROQ_API_KEY="your-api-key" | CODE |
| HIGH | docs/blog/posts/open_source.md | 190 | export TOGETHER_API_KEY="your-api-key" | CODE |
| HIGH | docs/blog/posts/langsmith.md | 30 | export LANGCHAIN_API_KEY=<your-api-key> | CODE |
| HIGH | docs/integrations/deepseek.md | 25 | export DEEPSEEK_API_KEY='your-api-key-here' | CODE |
| HIGH | docs/integrations/writer.md | 13 | export WRITER_API_KEY=<your-api-key-here> | CODE |
| HIGH | docs/integrations/xai.md | 29 | export XAI_API_KEY='your-api-key-here' | CODE |
| HIGH | docs/integrations/xai.md | 181 | export XAI_API_KEY="your-api-key-here" | STRING |
| HIGH | docs/integrations/anthropic.md | 40 | # os.environ["ANTHROPIC_API_KEY"] = "your-api-key" # Uncomment and replace with your API key if not set | COMMENT |
| HIGH | docs/integrations/anthropic.md | 356 | # os.environ["ANTHROPIC_API_KEY"] = "your-api-key" # Uncomment and replace with your API key if not set | COMMENT |
| HIGH | docs/integrations/anthropic.md | 405 | # os.environ["ANTHROPIC_API_KEY"] = "your-api-key" # Uncomment and replace with your API key if not set | COMMENT |
| HIGH | docs/integrations/anthropic.md | 493 | # os.environ["ANTHROPIC_API_KEY"] = "your-api-key" # Uncomment and replace with your API key if not set | STRING |
| HIGH | docs/integrations/anthropic.md | 567 | # os.environ["ANTHROPIC_API_KEY"] = "your-api-key" # Uncomment and replace with your API key if not set | COMMENT |
| HIGH | docs/integrations/groq.md | 13 | export GROQ_API_KEY=<your-api-key-here> | CODE |
| HIGH | docs/integrations/openai.md | 23 | export OPENAI_API_KEY='your-api-key-here' | CODE |
| HIGH | docs/integrations/openai.md | 33 | api_key='your-api-key-here', | CODE |
| HIGH | docs/integrations/mistral.md | 33 | client = Mistral(api_key='your-api-key-here') | CODE |
| HIGH | docs/integrations/perplexity.md | 15 | export PERPLEXITY_API_KEY=<your-api-key-here> | CODE |
| HIGH | docs/integrations/azure.md | 63 | os.environ["AZURE_OPENAI_API_KEY"] = "your-api-key" | CODE |
| HIGH | docs/integrations/azure.md | 80 | api_key="your-api-key", | CODE |
| HIGH | docs/examples/groq.md | 22 | export GROQ_API_KEY=<your-api-key> | CODE |
| HIGH | docs/examples/mistral.md | 23 | export MISTRAL_API_KEY=<your-api-key> | CODE |
| HIGH | docs/examples/batch_classification_langsmith.md | 21 | export LANGCHAIN_API_KEY=<your-api-key> | CODE |
| HIGH | docs/templates/provider_template.md | 40 | # os.environ["PROVIDER_API_KEY"] = "your-api-key" # Uncomment and replace with your API key if not set | COMMENT |
| HIGH | docs/templates/provider_template.md | 94 | # os.environ["PROVIDER_API_KEY"] = "your-api-key" # Uncomment and replace with your API key if not set | COMMENT |
| HIGH | examples/batch_api/run_batch_test.py | 102 | f"Please set your API key: export {required_key}='your-api-key-here'", | CODE |
| HIGH | examples/openai/run.py | 8 | export OPENAI_API_KEY=your-api-key | STRING |
| HIGH | instructor/v2/auto_client.py | 303 | "Set it with `export AZURE_OPENAI_API_KEY=<your-api-key>` or pass it as kwarg api_key=<your-api-key>" | CODE |
| HIGH | instructor/v2/auto_client.py | 380 | f"Set it with `export {env_var}=<your-api-key>` or pass it as kwarg api_key=<your-api-key>" | CODE |
| HIGH | instructor/v2/auto_client.py | 750 | "Set it with `export MISTRAL_API_KEY=<your-api-key>`." | CODE |
| HIGH | instructor/v2/auto_client.py | 850 | "Set it with `export PERPLEXITY_API_KEY=<your-api-key>` or pass it as a kwarg api_key=<your-api-key>" | CODE |
| HIGH | instructor/v2/auto_client.py | 1376 | "Set it with `export DEEPSEEK_API_KEY=<your-api-key>` or pass it as kwarg api_key=<your-api-key>" | CODE |
| HIGH | instructor/v2/auto_client.py | 1499 | "Set it with `export OPENROUTER_API_KEY=<your-api-key>` or pass it as kwarg api_key=<your-api-key>" | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | scripts/make_sitemap.py | 110 | Analyze the content of a file to extract summary, keywords, topics, and references. Args: client (Asyn | STRING |
| HIGH | instructor/v2/auto_client.py | 67 | Create an Instructor client from a model string. Args: model: String in format "provider/model-name" | STRING |
| HIGH | instructor/v2/core/patch.py | 85 | Patch a function to use v2 registry for structured outputs. Args: func: Function to patch (e.g., client.mes | STRING |
| HIGH | instructor/v2/core/hooks.py | 117 | Convert a string hook name to its corresponding enum value. Args: hook_name: Either a Hook | STRING |
| HIGH | instructor/v2/core/handler.py | 76 | Parse API response into validated Pydantic model. Args: response: Raw API response resp | STRING |
| HIGH | instructor/v2/core/templating.py | 94 | Handle templating for messages using the provided context. This function processes messages, applying Jinja2 t | STRING |
| HIGH | instructor/v2/core/protocols.py | 83 | Parse and validate response into model. Args: response: Raw API response response_model | STRING |
| HIGH | instructor/v2/core/registry.py | 160 | Get all handlers for a mode. This is the preferred method for retrieving handlers. It performs a single | STRING |
| HIGH | instructor/v2/core/registry.py | 227 | Get a specific handler for a mode. This is a convenience method that internally calls get_handlers(). F | STRING |
| HIGH | instructor/v2/core/multimodal.py | 448 | Attempt to autodetect a PDF from a source string or Path. Args: source (Union[str,path]): The source | STRING |
| HIGH | instructor/v2/core/response.py | 128 | Asynchronously process and transform LLM responses into structured models. This function is the async entry point f | STRING |
| HIGH | instructor/v2/core/response.py | 257 | Process and transform LLM responses into structured models (synchronous). This is the main entry point for converti | STRING |
| HIGH | instructor/v2/core/response.py | 463 | Compatibility dispatcher for provider-specific reask formatting. The retry loop itself lives in :mod:`instructor.v2 | STRING |
| HIGH | instructor/v2/core/retry.py | 125 | Sync retry logic using v2 registry handlers. Args: func: API function to call response_model: Pydan | STRING |
| HIGH | instructor/v2/core/retry.py | 370 | Async retry logic using v2 registry handlers. Args: func: Async API function to call response_model | STRING |
| HIGH | instructor/v2/core/exceptions.py | 62 | Validate and merge context parameters. Args: context: New-style context parameter valid | STRING |
| HIGH | instructor/v2/core/errors.py | 189 | Exception raised when all retry attempts have been exhausted. This exception is raised after the maximum number of | STRING |
| HIGH | instructor/v2/providers/cohere/client.py | 67 | Create an Instructor instance from a Cohere client using v2 registry. Args: client: A Cohere client instanc | STRING |
| HIGH | instructor/v2/providers/fireworks/client.py | 54 | Create an Instructor instance from a Fireworks client using v2 registry. Fireworks uses an OpenAI-compatible API, s | STRING |
| HIGH | instructor/v2/providers/groq/client.py | 53 | Create an Instructor instance from a Groq client using v2 registry. Groq uses an OpenAI-compatible API, so this fac | STRING |
| HIGH | instructor/v2/providers/xai/client.py | 193 | Create an Instructor instance from an xAI client using v2 registry. Args: client: An instance of xAI client | STRING |
| HIGH | instructor/v2/providers/bedrock/client.py | 51 | Create an Instructor instance from a Bedrock client using v2 registry. Bedrock uses the Converse API through a boto | STRING |
| HIGH | instructor/v2/providers/writer/client.py | 53 | Create an Instructor instance from a Writer client using v2 registry. Writer uses the writerai SDK and supports TOO | STRING |
| HIGH | instructor/v2/providers/anthropic/client.py | 68 | Create an Instructor instance from an Anthropic client using v2 registry. Args: client: An instance of Anth | STRING |
| HIGH | instructor/v2/providers/cerebras/client.py | 54 | Create an Instructor instance from a Cerebras client using v2 registry. Cerebras uses an OpenAI-compatible API, so | STRING |
| HIGH | instructor/v2/providers/mistral/client.py | 70 | Create an Instructor instance from a Mistral client using v2 registry. Mistral uses a single client class with both | STRING |
| HIGH | instructor/v2/providers/openai/client.py | 125 | Create an Instructor instance from an OpenAI client using v2 registry. Args: client: An instance of OpenAI | STRING |
| HIGH | instructor/v2/providers/openai/client.py | 205 | Create an Instructor instance for Anyscale. Supports two usage patterns: 1. String-based (recommended): Pass a | STRING |
| HIGH | instructor/v2/providers/openai/client.py | 298 | Create an Instructor instance for Together AI. Supports two usage patterns: 1. String-based (recommended): Pas | STRING |
| HIGH | instructor/v2/providers/openai/client.py | 391 | Create an Instructor instance for Databricks. Supports two usage patterns: 1. String-based (recommended): Pass | STRING |
| HIGH | instructor/v2/providers/openai/client.py | 484 | Create an Instructor instance for DeepSeek. Supports two usage patterns: 1. String-based (recommended): Pass a | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_batch_in_memory.py | 163 | # Create a valid OpenAI batch request | COMMENT |
| MEDIUM⚡ | tests/test_batch_in_memory.py | 192 | # Create a valid Anthropic batch request | COMMENT |
| MEDIUM⚡ | tests/test_genai_config_merging.py | 31 | # Create a mock config object with thinking_config | COMMENT |
| MEDIUM⚡ | tests/test_genai_config_merging.py | 38 | # Create a config object with thinking_config attribute | COMMENT |
| MEDIUM | tests/test_genai_config_merging.py | 60 | # Create a mock config object with thinking_config | COMMENT |
| MEDIUM | tests/test_genai_config_merging.py | 299 | # Create a config with cached_content | COMMENT |
| MEDIUM | tests/test_genai_config_merging.py | 356 | # Create a config with cached_content | COMMENT |
| MEDIUM | tests/llm/test_genai/test_utils.py | 278 | # Create a mock ThinkingConfig-like object | COMMENT |
| MEDIUM | tests/llm/test_genai/test_schema_conversion.py | 160 | # Create a schema with a true union (not just Optional) | COMMENT |
| MEDIUM | tests/llm/test_genai/test_schema_conversion.py | 208 | # Create a model with a true union type (not Optional or Decimal) | COMMENT |
| MEDIUM | tests/providers/test_auto_client.py | 575 | # Create a mock google module | COMMENT |
| MEDIUM | tests/providers/test_auto_client.py | 653 | # Create a mock google module with genai attribute | COMMENT |
| MEDIUM | tests/v2/test_handlers_parametrized.py | 356 | # Create a mock that works with dump_message | COMMENT |
| MEDIUM | tests/v2/test_client_unified.py | 509 | # Create a mock OpenAI client | COMMENT |
| MEDIUM⚡ | tests/v2/test_cohere_handlers.py | 646 | # Create a response that has neither .text nor valid .message.content | COMMENT |
| MEDIUM | examples/extracting-pii/run.py | 50 | # Define the PII Scrubbing Model | STRING |
| MEDIUM | examples/learn-async/run.py | 96 | # Create a semaphore that will only allow 2 concurrent requests | COMMENT |
| MEDIUM | examples/tenacity-benchmarks/run.py | 91 | # Create a simple mock response for RateLimitError | COMMENT |
| MEDIUM | examples/tenacity-benchmarks/run.py | 101 | # Create a simple mock request for APIError | COMMENT |
| MEDIUM | examples/tenacity-benchmarks/run.py | 461 | # Create a simple mock response for RateLimitError | COMMENT |
| MEDIUM | examples/tenacity-benchmarks/run.py | 471 | # Create a simple mock request for APIError | COMMENT |
| MEDIUM | examples/hooks/run.py | 53 | # Create a statistics collector | COMMENT |
| MEDIUM | examples/sqlmodel/test_basic.py | 75 | # Create a team | COMMENT |
| MEDIUM | instructor/cli/batch.py | 130 | # Create a dummy model string for the provider | COMMENT |
| MEDIUM | instructor/cli/batch.py | 140 | # Create a dummy response model (not used for listing) | COMMENT |
| MEDIUM | instructor/cli/batch.py | 258 | # Create a dummy response model (not used for direct file submission) | COMMENT |
| MEDIUM | instructor/cli/batch.py | 312 | # Create a dummy response model (not used for cancellation) | COMMENT |
| MEDIUM | instructor/cli/batch.py | 318 | # Create a dummy model string for the provider | COMMENT |
| MEDIUM | instructor/cli/batch.py | 359 | # Create a dummy response model (not used for deletion) | COMMENT |
| MEDIUM | instructor/cli/batch.py | 365 | # Create a dummy model string for the provider | COMMENT |
| MEDIUM | instructor/cli/usage.py | 52 | # Define the cost per unit for each model | COMMENT |
| MEDIUM | instructor/v2/core/response.py | 559 | # Create a shallow copy of kwargs to avoid modifying the original | COMMENT |
| MEDIUM | instructor/v2/core/function_calls.py | 600 | # Create the wrapped model | COMMENT |
| MEDIUM⚡ | instructor/v2/dsl/partial.py | 2 | # The following code is adapted from a comment on GitHub in the pydantic/pydantic repository by silviumarcu. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/providers/test_auto_client.py | 451 | CODE | |
| LOW | tests/providers/test_auto_client.py | 472 | CODE | |
| LOW | tests/providers/test_auto_client.py | 596 | CODE | |
| LOW | tests/providers/test_auto_client.py | 634 | CODE | |
| LOW | tests/v2/test_handlers_parametrized.py | 499 | CODE | |
| LOW | tests/v2/test_handlers_parametrized.py | 536 | CODE | |
| LOW | tests/multimodal/test_multimodal.py | 349 | CODE | |
| LOW | examples/batch_api/in_memory_batch_example.py | 20 | CODE | |
| LOW | examples/batch_api/run_batch_test.py | 179 | CODE | |
| LOW | examples/batch_api/run_batch_test.py | 284 | CODE | |
| LOW | examples/batch_api/run_batch_test.py | 354 | CODE | |
| LOW | examples/batch_api/run_batch_test.py | 469 | CODE | |
| LOW | examples/tenacity-benchmarks/run.py | 433 | CODE | |
| LOW | examples/tenacity-benchmarks/run.py | 81 | CODE | |
| LOW | examples/sqlmodel/test_basic.py | 68 | CODE | |
| LOW | scripts/audit_patterns.py | 62 | CODE | |
| LOW | scripts/audit_patterns.py | 109 | CODE | |
| LOW | scripts/validate_meta_tags.py | 53 | CODE | |
| LOW | scripts/validate_meta_tags.py | 101 | CODE | |
| LOW | scripts/check_links.py | 91 | CODE | |
| LOW | scripts/check_links.py | 124 | CODE | |
| LOW | scripts/make_clean.py | 48 | CODE | |
| LOW | scripts/make_sitemap.py | 18 | CODE | |
| LOW | scripts/make_sitemap.py | 43 | CODE | |
| LOW | scripts/make_sitemap.py | 107 | CODE | |
| LOW | scripts/validate_headings.py | 86 | CODE | |
| LOW | scripts/make_desc.py | 75 | CODE | |
| LOW | instructor/cli/batch.py | 18 | CODE | |
| LOW | instructor/cli/batch.py | 397 | CODE | |
| LOW | instructor/cli/batch.py | 449 | CODE | |
| LOW | instructor/cli/batch.py | 511 | CODE | |
| LOW | instructor/cli/jobs.py | 146 | CODE | |
| LOW | instructor/v2/auto_client.py | 966 | CODE | |
| LOW | instructor/v2/core/hooks.py | 136 | CODE | |
| LOW | instructor/v2/core/multimodal.py | 712 | CODE | |
| LOW | instructor/v2/core/multimodal.py | 801 | CODE | |
| LOW | instructor/v2/core/multimodal.py | 167 | CODE | |
| LOW | instructor/v2/core/multimodal.py | 623 | CODE | |
| LOW | instructor/v2/core/retry.py | 113 | CODE | |
| LOW | instructor/v2/core/retry.py | 358 | CODE | |
| LOW | instructor/v2/core/messages.py | 51 | CODE | |
| LOW | instructor/v2/core/messages.py | 72 | CODE | |
| LOW | instructor/v2/core/json.py | 9 | CODE | |
| LOW | instructor/v2/core/json.py | 76 | CODE | |
| LOW | instructor/v2/core/json.py | 174 | CODE | |
| LOW | instructor/v2/providers/cohere/handlers.py | 93 | CODE | |
| LOW | instructor/v2/providers/gemini/handlers.py | 161 | CODE | |
| LOW | instructor/v2/providers/gemini/utils.py | 77 | CODE | |
| LOW | instructor/v2/providers/gemini/utils.py | 128 | CODE | |
| LOW | instructor/v2/providers/gemini/utils.py | 229 | CODE | |
| LOW | instructor/v2/providers/gemini/utils.py | 321 | CODE | |
| LOW | instructor/v2/providers/gemini/utils.py | 353 | CODE | |
| LOW | instructor/v2/providers/gemini/utils.py | 383 | CODE | |
| LOW | instructor/v2/providers/gemini/utils.py | 152 | CODE | |
| LOW | instructor/v2/providers/xai/client.py | 68 | CODE | |
| LOW | instructor/v2/providers/xai/client.py | 120 | CODE | |
| LOW | instructor/v2/providers/xai/client.py | 188 | CODE | |
| LOW | instructor/v2/providers/xai/client.py | 260 | CODE | |
| LOW | instructor/v2/providers/xai/client.py | 420 | CODE | |
| LOW | instructor/v2/providers/xai/handlers.py | 58 | CODE | |
| 42 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples/citation_with_extraction/main.py | 17 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/tenacity-benchmarks/run.py | 39 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/asyncio-benchmarks/run.py | 26 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/sqlmodel/test_basic.py | 15 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/sqlmodel/run.py | 32 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/caching/run.py | 31 | logger = logging.getLogger(__name__) | CODE |
| LOW | instructor/__init__.py | 71 | __all__ = [ | CODE |
| LOW | instructor/exceptions.py | 35 | __all__ = [ | CODE |
| LOW | instructor/core/__init__.py | 22 | __all__ = [ | CODE |
| LOW | instructor/cache/__init__.py | 35 | __all__ = [ | CODE |
| LOW | instructor/processing/__init__.py | 18 | __all__ = [ | CODE |
| LOW | instructor/processing/schema.py | 9 | __all__ = [ | CODE |
| LOW | instructor/providers/cohere/client.py | 5 | __all__ = ["from_cohere"] | CODE |
| LOW | instructor/providers/gemini/client.py | 5 | __all__ = ["from_gemini"] | CODE |
| LOW | instructor/providers/fireworks/client.py | 5 | __all__ = ["from_fireworks"] | CODE |
| LOW | instructor/providers/groq/client.py | 5 | __all__ = ["from_groq"] | CODE |
| LOW | instructor/providers/xai/client.py | 5 | __all__ = ["from_xai"] | CODE |
| LOW | instructor/providers/bedrock/client.py | 5 | __all__ = ["from_bedrock"] | CODE |
| LOW | instructor/providers/writer/client.py | 5 | __all__ = ["from_writer"] | CODE |
| LOW | instructor/providers/vertexai/client.py | 5 | __all__ = ["from_vertexai"] | CODE |
| LOW | instructor/providers/perplexity/client.py | 5 | __all__ = ["from_perplexity"] | CODE |
| LOW | instructor/providers/anthropic/client.py | 5 | __all__ = ["from_anthropic"] | CODE |
| LOW | instructor/providers/cerebras/client.py | 5 | __all__ = ["from_cerebras"] | CODE |
| LOW | instructor/providers/genai/client.py | 5 | __all__ = ["from_genai"] | CODE |
| LOW | instructor/providers/mistral/client.py | 5 | __all__ = ["from_mistral"] | CODE |
| LOW | instructor/utils/__init__.py | 27 | __all__ = [ | CODE |
| LOW | instructor/utils/core.py | 26 | __all__ = [ | CODE |
| LOW | instructor/v2/__init__.py | 9 | __all__ = [ | CODE |
| LOW | instructor/v2/core/__init__.py | 8 | __all__ = [ | CODE |
| LOW | instructor/v2/core/schema.py | 19 | __all__ = [ | CODE |
| LOW | instructor/v2/providers/cohere/handlers.py | 475 | __all__ = [ | STRING |
| LOW | instructor/v2/providers/cohere/__init__.py | 8 | __all__ = ["from_cohere"] | CODE |
| LOW | instructor/v2/providers/gemini/client.py | 100 | __all__ = ["from_gemini"] | CODE |
| LOW | instructor/v2/providers/gemini/handlers.py | 324 | __all__ = ["GeminiToolsHandler", "GeminiJSONHandler"] | CODE |
| LOW | instructor/v2/providers/gemini/__init__.py | 9 | __all__ = ["GeminiJSONHandler", "GeminiToolsHandler", "from_gemini"] | CODE |
| LOW | instructor/v2/providers/openrouter/client.py | 51 | __all__ = ["from_openrouter"] | CODE |
| LOW | instructor/v2/providers/openrouter/handlers.py | 48 | __all__ = ["OpenRouterJSONSchemaHandler"] | CODE |
| LOW | instructor/v2/providers/openrouter/__init__.py | 6 | __all__ = ["OpenRouterJSONSchemaHandler", "from_openrouter"] | CODE |
| LOW | instructor/v2/providers/fireworks/__init__.py | 12 | __all__ = ["from_fireworks"] | CODE |
| LOW | instructor/v2/providers/groq/__init__.py | 8 | __all__ = ["from_groq"] | CODE |
| LOW | instructor/v2/providers/xai/handlers.py | 800 | __all__ = [ | CODE |
| LOW | instructor/v2/providers/xai/__init__.py | 11 | __all__ = ["from_xai"] | CODE |
| LOW | instructor/v2/providers/bedrock/client.py | 138 | __all__ = ["from_bedrock"] | CODE |
| LOW | instructor/v2/providers/bedrock/handlers.py | 558 | __all__ = [ | CODE |
| LOW | instructor/v2/providers/bedrock/__init__.py | 8 | __all__ = ["from_bedrock"] | CODE |
| LOW | instructor/v2/providers/writer/handlers.py | 370 | __all__ = [ | CODE |
| LOW | instructor/v2/providers/writer/__init__.py | 8 | __all__ = ["from_writer"] | CODE |
| LOW | instructor/v2/providers/vertexai/client.py | 97 | __all__ = ["from_vertexai"] | CODE |
| LOW | instructor/v2/providers/vertexai/handlers.py | 492 | __all__ = [ | CODE |
| LOW | instructor/v2/providers/vertexai/__init__.py | 8 | __all__ = [ | CODE |
| LOW | instructor/v2/providers/perplexity/client.py | 51 | __all__ = ["from_perplexity"] | CODE |
| LOW | instructor/v2/providers/perplexity/handlers.py | 74 | __all__ = ["PerplexityMDJSONHandler"] | CODE |
| LOW | instructor/v2/providers/perplexity/__init__.py | 6 | __all__ = ["PerplexityMDJSONHandler", "from_perplexity"] | CODE |
| LOW | instructor/v2/providers/anthropic/handlers.py | 937 | __all__ = [ | STRING |
| LOW | instructor/v2/providers/anthropic/__init__.py | 8 | __all__ = ["from_anthropic"] | CODE |
| LOW | instructor/v2/providers/cerebras/__init__.py | 8 | __all__ = ["from_cerebras"] | CODE |
| LOW | instructor/v2/providers/genai/__init__.py | 10 | __all__ = ["from_genai"] | CODE |
| LOW | instructor/v2/providers/litellm/__init__.py | 5 | __all__ = ["from_litellm"] | CODE |
| LOW | instructor/v2/providers/mistral/handlers.py | 626 | __all__ = [ | CODE |
| LOW | instructor/v2/providers/mistral/__init__.py | 12 | __all__ = ["from_mistral"] | CODE |
| 10 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/llm/shared_config.py | 94 | # Check if API key is set | COMMENT |
| LOW | tests/llm/shared_config.py | 98 | # Check if package is installed | COMMENT |
| LOW | tests/llm/test_openai/test_attr.py | 21 | # Check if the 'embeddings' attribute can be accessed through the client | COMMENT |
| LOW | examples/batch_api/run_batch_test.py | 304 | # Check if batch ID file exists | COMMENT |
| LOW | examples/batch_api/run_batch_test.py | 365 | # Check if batch ID file exists | COMMENT |
| LOW | examples/asyncio-benchmarks/run.py | 277 | # Check if OpenAI API key is set | COMMENT |
| LOW | examples/citations/run.py | 30 | # Check if the substring_quote is in the text_chunk | COMMENT |
| LOW | examples/sqlmodel/run.py | 226 | # Check if team already exists | COMMENT |
| LOW | examples/sqlmodel/run.py | 360 | if isinstance(hero, Hero): # Check if not an exception | CODE |
| LOW | examples/caching/example_redis.py | 22 | # Check if the result is already cached | COMMENT |
| LOW | examples/caching/run.py | 150 | # Check if we'll get a cache hit by calling cache_info | COMMENT |
| LOW | examples/caching/run.py | 211 | # Check if the result is already cached | COMMENT |
| LOW | examples/caching/run.py | 288 | # Check if the result is already cached | COMMENT |
| LOW | examples/caching/example_diskcache.py | 32 | # Check if the result is already cached | COMMENT |
| LOW | examples/caching/example_diskcache.py | 48 | # Check if the result is already cached | COMMENT |
| LOW | examples/logging/run.py | 8 | # Set logging to DEBUG | COMMENT |
| LOW⚡ | scripts/check_blog_excerpts.py | 49 | # Read the file content | COMMENT |
| LOW⚡ | scripts/check_blog_excerpts.py | 53 | # Check if the file contains the <!-- more --> tag | COMMENT |
| LOW | scripts/audit_patterns.py | 66 | # Check if from_provider is used | COMMENT |
| LOW | scripts/audit_patterns.py | 84 | # Check if the import is actually used | COMMENT |
| LOW | scripts/check_links.py | 63 | # Check if file exists | COMMENT |
| LOW | scripts/make_clean.py | 88 | # Check if content was modified | COMMENT |
| LOW | scripts/make_sitemap.py | 215 | # Check if we can reuse existing data | COMMENT |
| LOW | instructor/cache/__init__.py | 214 | # Check if this looks like a Pydantic-serialized object (has proper structure) | COMMENT |
| LOW | instructor/cli/batch.py | 194 | # Check if required API key is available for the provider | COMMENT |
| LOW | instructor/v2/auto_client.py | 1317 | # Check if model supports tools by looking at model name | COMMENT |
| LOW | instructor/v2/core/registry.py | 187 | # Check if already loaded | COMMENT |
| LOW | instructor/v2/core/registry.py | 348 | # Check if handlers are registered | COMMENT |
| LOW | instructor/v2/core/client.py | 778 | # Check if the response model is an iterable type | COMMENT |
| LOW | instructor/v2/core/multimodal.py | 544 | # Check if it's a valid PDF by looking for the PDF header | COMMENT |
| LOW | instructor/v2/providers/fireworks/client.py | 85 | # Check if fireworks is installed | COMMENT |
| LOW | instructor/v2/providers/groq/client.py | 84 | # Check if groq is installed | COMMENT |
| LOW | instructor/v2/providers/writer/client.py | 84 | # Check if writerai SDK is installed | COMMENT |
| LOW | instructor/v2/providers/cerebras/client.py | 85 | # Check if cerebras SDK is installed | COMMENT |
| LOW | instructor/v2/providers/mistral/client.py | 105 | # Check if mistralai is installed | COMMENT |
| LOW | instructor/v2/dsl/simple_type.py | 96 | # Check if inner type is a BaseModel - if so, not a simple type | COMMENT |
| LOW | instructor/v2/dsl/partial.py | 122 | # Check if root is complete AND has actual data (not just empty {}) | COMMENT |
| LOW | instructor/batch/processor.py | 209 | # Check if this is a provider error response | COMMENT |
| LOW | instructor/batch/processor.py | 263 | # Check if result is an error | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | sitemap.yaml | 557 | blog/posts/fake-data.md: | CODE |
| LOW | tests/llm/test_core_providers/test_validation.py | 52 | assert user.name == "John Doe" | CODE |
| LOW⚡ | tests/llm/test_core_providers/test_basic_extraction.py | 88 | assert user.name == "John Doe" | CODE |
| LOW⚡ | tests/llm/test_core_providers/test_basic_extraction.py | 91 | assert user.address.street == "123 Main St" | CODE |
| LOW | tests/llm/test_writer/test_format_difficult_models.py | 101 | assert {book.author for book in response.books} == {"Jane Doe", "John Smith"} | STRING |
| LOW | tests/llm/test_genai/test_invalid_schema.py | 125 | assert response.name == "John Doe" | CODE |
| LOW | tests/llm/test_genai/test_invalid_schema.py | 193 | assert response.name == "John Doe" | CODE |
| LOW | tests/core/test_schema.py | 145 | name: str = "John Doe" | CODE |
| LOW | tests/processing/test_json_extraction.py | 102 | "street": "123 Main St", | CODE |
| LOW | docs/llms.txt | 89 | print(user.name) # "John Doe" | CODE |
| LOW | docs/index.md | 428 | #> User(name='John Doe', age=30) | COMMENT |
| LOW | docs/contributing.md | 427 | print(person.name) # "John Doe" | CODE |
| LOW | docs/prompting/zero_shot/style_prompting.md | 53 | sender="Jane Doe", | STRING |
| LOW | docs/learning/getting_started/structured_outputs.md | 72 | print(customer) # Customer(name='John Doe', age=35, email='john@example.com') | CODE |
| LOW | docs/blog/posts/structured-output-anthropic.md | 75 | "name": "John Doe", | STRING |
| LOW | docs/blog/posts/fake-data.md | 92 | #> name='John Doe' age=25 | COMMENT |
| LOW⚡ | docs/blog/posts/version-1.md | 206 | #> name='John Doe' age=None | COMMENT |
| LOW⚡ | docs/blog/posts/version-1.md | 207 | #> name='John Doe' age=None | COMMENT |
| LOW⚡ | docs/blog/posts/version-1.md | 208 | #> name='John Doe' age=None | COMMENT |
| LOW⚡ | docs/blog/posts/version-1.md | 209 | #> name='John Doe' age=None | COMMENT |
| LOW⚡ | docs/blog/posts/version-1.md | 210 | #> name='John Doe' age=30 | COMMENT |
| LOW⚡ | docs/blog/posts/version-1.md | 211 | #> name='John Doe' age=30 | COMMENT |
| LOW⚡ | docs/blog/posts/version-1.md | 215 | # name='John Doe' age=None | COMMENT |
| LOW⚡ | docs/blog/posts/version-1.md | 216 | # name='John Doe' age=30 | COMMENT |
| LOW⚡ | docs/blog/posts/version-1.md | 250 | #> name='John Doe' age=30 | COMMENT |
| LOW⚡ | docs/blog/posts/version-1.md | 251 | #> name='Jane Doe' age=28 | COMMENT |
| LOW⚡ | docs/blog/posts/version-1.md | 252 | # User(name='John Doe', age=30) | COMMENT |
| LOW | docs/blog/posts/using_json.md | 77 | # "name": "John Doe", | COMMENT |
| LOW | docs/integrations/deepseek.md | 156 | #> 'street': '123 Main St', | STRING |
| LOW | docs/integrations/fireworks.md | 135 | #> 'street': '123 Main St', | STRING |
| LOW | docs/integrations/writer.md | 127 | #> 'street': '123 Main St', | STRING |
| LOW | docs/integrations/xai.md | 126 | #> 'street': '123 Main St', | STRING |
| LOW | docs/integrations/anthropic.md | 82 | # "name": "John Doe", | COMMENT |
| LOW | docs/integrations/groq.md | 144 | #> 'street': '123 Main St', | STRING |
| LOW | docs/integrations/openai.md | 174 | #> 'street': '123 Main St', | STRING |
| LOW | docs/integrations/bedrock.md | 273 | #> Address(street='123 Main St', city='New York', country='USA'), | STRING |
| LOW | docs/integrations/mistral.md | 173 | # Address(street='123 Main St', city='New York', country='USA'), | STRING |
| LOW | docs/integrations/cortex.md | 143 | #> 'street': '123 Main St', | STRING |
| LOW | docs/integrations/cerebras.md | 123 | #> 'street': '123 Main St', | STRING |
| LOW | docs/integrations/google.md | 235 | #> 'street': '123 Main St', | STRING |
| LOW | docs/integrations/perplexity.md | 142 | #> Address(street='123 Main St', city='New York', country='USA'), | STRING |
| LOW | docs/integrations/openrouter.md | 135 | #> name='Jason' age=25 addresses=[Address(street='123 Main St', city='New York', country='USA'), Address(street='456 Bea | STRING |
| LOW | docs/integrations/azure.md | 206 | # 'street': '123 Main St', | STRING |
| LOW | docs/examples/pii.md | 109 | {"private_data":[{"index":1,"data_type":"Name","pii_value":"John Doe"},{"index":2,"data_type":"Email","pii_value":"john. | CODE |
| LOW | docs/examples/extracting_receipts.md | 175 | items=[Item(name='Lorem ipsum', price=9.2, quantity=1), Item(name='Lorem ipsum dolor sit', price=19.2, quantity=1), Item | STRING |
| LOW | docs/examples/extracting_receipts.md | 175 | items=[Item(name='Lorem ipsum', price=9.2, quantity=1), Item(name='Lorem ipsum dolor sit', price=19.2, quantity=1), Item | STRING |
| LOW | docs/concepts/partial.md | 131 | "name": "John Doe", | CODE |
| LOW | docs/concepts/templating.md | 52 | #> name='John Doe' age=30 | COMMENT |
| LOW | docs/concepts/fields.md | 17 | name: str = Field(default='John Doe') | CODE |
| LOW | docs/concepts/fields.md | 22 | #> name='John Doe' | COMMENT |
| LOW | examples/simple-extraction/user.py | 56 | "name": "John Doe", | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | sitemap.yaml | 2435 | - concepts/prompting.md#chain-of-thought] | CODE |
| MEDIUM | cross_link_mapping.yaml | 201 | # RAG AND SEARCH CLUSTER | COMMENT |
| MEDIUM | docs/prompting/index.md | 14 | [:octicons-arrow-right-16: Zero-Shot](#zero-shot) · [:octicons-arrow-right-16: Few-Shot](#few-shot) | CODE |
| MEDIUM | docs/prompting/index.md | 106 | ## Zero-Shot {#zero-shot} | COMMENT |
| MEDIUM | docs/prompting/index.md | 121 | ## Few-Shot {#few-shot} | COMMENT |
| MEDIUM | docs/blog/posts/rag-and-beyond.md | 19 | # RAG is more than just embedding search | COMMENT |
| MEDIUM | docs/blog/posts/rag-and-beyond.md | 36 | ## The 'Dumb' RAG Model | COMMENT |
| MEDIUM | docs/blog/posts/rag-and-beyond.md | 51 | ## Improving the RAG Model with Query Understanding | COMMENT |
| MEDIUM | docs/blog/posts/situate-context.md | 30 | ## Background: The Context Problem in RAG | COMMENT |
| MEDIUM | docs/blog/posts/llm-as-reranker.md | 19 | # Building an LLM-based Reranker for your RAG pipeline | COMMENT |
| MEDIUM | docs/blog/posts/rag-timelines.md | 20 | # Enhancing RAG with Time Filters Using Instructor | COMMENT |
| MEDIUM | docs/integrations/truefoundry.md | 9 | TrueFoundry provides an enterprise-ready [AI Gateway](https://www.truefoundry.com/ai-gateway) and integrates seamlessly | CODE |
| MEDIUM | docs/examples/classification.md | 32 | Using [Chain of Thought](../concepts/prompting.md#chain-of-thought) has been shown to improve the quality of the pre | CODE |
| MEDIUM | docs/examples/bulk_classification.md | 179 | response_model=Tag, # Minimizes the hallucination of tags that are not in the allowed tags. | CODE |
| MEDIUM | docs/examples/bulk_classification.md | 259 | response_model=Tag, # Minimizes the hallucination of tags that are not in the allowed tags. | CODE |
| MEDIUM | docs/concepts/prompting.md | 18 | ## Modular Chain of Thought {#chain-of-thought} | COMMENT |
| MEDIUM | examples/validated-multiclass/run.py | 60 | # Minizises the hallucination of tags that are not in the allowed tags. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | NEW_PROVIDER_AGENT_INSTRUCTIONS.md | 31 | ### Step 1: Project Structure Setup | COMMENT |
| LOW | NEW_PROVIDER_AGENT_INSTRUCTIONS.md | 58 | ### Step 2: Provider Client Implementation | COMMENT |
| LOW | NEW_PROVIDER_AGENT_INSTRUCTIONS.md | 161 | ### Step 3: Mode Handlers Implementation | COMMENT |
| LOW | NEW_PROVIDER_AGENT_INSTRUCTIONS.md | 285 | ### Step 4: Package Configuration | COMMENT |
| LOW | NEW_PROVIDER_AGENT_INSTRUCTIONS.md | 347 | ### Step 3: Testing Implementation | COMMENT |
| LOW | NEW_PROVIDER_AGENT_INSTRUCTIONS.md | 527 | ### Step 4: Required Infrastructure Updates | COMMENT |
| LOW | NEW_PROVIDER_AGENT_INSTRUCTIONS.md | 573 | ### Step 5: Documentation | COMMENT |
| LOW⚡ | docs/prompting/few_shot/exemplar_selection/knn.md | 120 | # Step 1 : Embed the Examples | STRING |
| LOW⚡ | docs/prompting/few_shot/exemplar_selection/knn.md | 126 | # # Step 3: Find the k closest examples to the query | STRING |
| LOW⚡ | docs/prompting/few_shot/exemplar_selection/knn.md | 134 | # Step 4: Use these examples as in-context examples | STRING |
| LOW | docs/prompting/zero_shot/s2a.md | 76 | # Step 1: Rewrite the prompt | STRING |
| LOW | docs/prompting/zero_shot/s2a.md | 85 | # Step 2: Generate the final response | STRING |
| LOW | docs/prompting/self_criticism/self_verification.md | 121 | # Step 1: Forward Reasoning | STRING |
| LOW | docs/prompting/self_criticism/self_verification.md | 124 | # Step 2: Backwards Verification | STRING |
| LOW | docs/prompting/ensembling/cosp.md | 15 | ### Step 1 - Selecting Examples | COMMENT |
| LOW | docs/prompting/ensembling/cosp.md | 57 | ### Step 2 - Self Consistency | COMMENT |
| LOW | docs/prompting/ensembling/cosp.md | 252 | # Step 1 : Generate the examples | STRING |
| LOW | docs/prompting/ensembling/cosp.md | 258 | # Step 2 : Run Self-Consistency | STRING |
| LOW | docs/prompting/decomposition/skeleton_of_thought.md | 89 | # Step 1: Get the skeleton | STRING |
| LOW | docs/prompting/decomposition/skeleton_of_thought.md | 105 | # Step 2: Expand on each point in parallel | STRING |
| LOW | docs/learning/getting_started/first_extraction.md | 49 | ### Step 1: Define Your LLM Output Schema | COMMENT |
| LOW | docs/learning/getting_started/first_extraction.md | 61 | ### Step 2: Configure Your LLM Client | COMMENT |
| LOW | docs/learning/getting_started/first_extraction.md | 69 | ### Step 3: Execute LLM Extraction | COMMENT |
| LOW | docs/learning/getting_started/first_extraction.md | 86 | ### Step 4: Work with Validated LLM Data | COMMENT |
| LOW | docs/integrations/truefoundry.md | 22 | ### Step 1: Install Dependencies | COMMENT |
| LOW | docs/integrations/truefoundry.md | 28 | ### Step 2: Configure Instructor with TrueFoundry Gateway | COMMENT |
| LOW | docs/concepts/reask_validation.md | 120 | ### Step 1: Define the Response Model with Validators | COMMENT |
| LOW | instructor/v2/README.md | 344 | #### Step 1: Analyze Your V1 Implementation | COMMENT |
| LOW | instructor/v2/README.md | 401 | #### Step 2: Create V2 Provider Directory Structure | COMMENT |
| LOW | instructor/v2/README.md | 412 | #### Step 3: Map V1 Modes to V2 Modes | COMMENT |
| LOW | instructor/v2/README.md | 422 | #### Step 4: Extract Handler Logic from V1 | COMMENT |
| LOW | instructor/v2/README.md | 460 | #### Step 5: Implement V2 Handlers | COMMENT |
| LOW | instructor/v2/README.md | 540 | #### Step 6: Create V2 Factory Function | COMMENT |
| LOW | instructor/v2/README.md | 631 | #### Step 7: Export Provider | COMMENT |
| LOW | instructor/v2/README.md | 658 | #### Step 8: Write Comprehensive Tests | COMMENT |
| LOW | instructor/v2/README.md | 695 | #### Step 9: Update Integration Points | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/test_genai_config_merging.py | 190 | # Test with Optional type (Union with null) | COMMENT |
| HIGH | tests/test_anthropic_bedrock_caller.py | 5 | resulting dict contained "caller": null, which the Anthropic API rejected with | STRING |
| HIGH | tests/llm/test_genai/test_schema_conversion.py | 66 | """Test conversion transforms anyOf[T, null] to nullable fields.""" | STRING |
| HIGH | tests/llm/test_genai/test_schema_conversion.py | 223 | # Schema with Optional field (Union with null) | COMMENT |
| HIGH | tests/dsl/test_partial.py | 976 | chunks = ['{"name": "Al', 'ice", "email"', ": null}"] | CODE |
| HIGH | tests/dsl/test_partial.py | 1015 | yield ": null}" | CODE |
| HIGH | examples/simple-extraction/maybe_user.py | 66 | "user": null, | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | docs/examples/sqlmodel.md | 93 | # AI-generated fields | COMMENT |
| HIGH | docs/examples/sqlmodel.md | 589 | # AI-generated fields with database constraints | COMMENT |
| HIGH | examples/sqlmodel/run.py | 86 | # AI-generated fields with validation | COMMENT |
| HIGH | examples/sqlmodel/run.py | 119 | # AI-generated fields | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | requirements.txt | 1 | # This file was autogenerated by uv via the following command: | COMMENT |
| LOW | requirements.txt | 21 | # httpcore | COMMENT |
| LOW | requirements.txt | 41 | # via openai | COMMENT |
| LOW | requirements.txt | 61 | # via | COMMENT |
| LOW | requirements.txt | 81 | # via instructor (pyproject.toml) | COMMENT |
| LOW | requirements.txt | 101 | # anyio | COMMENT |
| LOW | docs/blog/posts/version-1.md | 201 | print(user) | COMMENT |
| LOW | docs/blog/posts/generating-pdf-citations.md | 101 | }, | COMMENT |
| LOW | docs/blog/posts/introducing-structured-outputs.md | 121 | #> {" | COMMENT |
| LOW | docs/blog/posts/introducing-structured-outputs.md | 141 | #> {" | COMMENT |
| LOW | …cs/blog/posts/announcing-unified-provider-interface.md | 41 | - **Simplified Configuration**: Reduces boilerplate code in projects that integrate with multiple LLM providers. | COMMENT |
| LOW | docs/integrations/fireworks.md | 121 | He lives at 123 Main St, New York, USA | COMMENT |
| LOW | docs/integrations/writer.md | 121 | print(user) | COMMENT |
| LOW | docs/integrations/xai.md | 121 | #> { | COMMENT |
| LOW | docs/integrations/anthropic.md | 81 | # { | COMMENT |
| LOW | docs/integrations/anthropic.md | 221 | # Image.from_path("path/to/local/image.jpg") | COMMENT |
| LOW | docs/integrations/groq.md | 141 | #> 'age': 25, | COMMENT |
| LOW | docs/integrations/openai.md | 161 | He lives at 123 Main St, New York, USA | COMMENT |
| LOW | docs/integrations/cortex.md | 141 | #> 'addresses': [ | COMMENT |
| LOW | docs/integrations/cerebras.md | 121 | #> 'addresses': [ | COMMENT |
| LOW | docs/integrations/google.md | 221 | He lives at 123 Main St, New York, USA | COMMENT |
| LOW | docs/integrations/azure.md | 201 | # { | COMMENT |
| LOW | docs/concepts/prompt_caching.md | 241 | # id='msg_01QcqjktYc1PXL8nk7y5hkMV', | COMMENT |
| LOW | examples/recursive_filepaths/parse_recursive_paths.py | 121 | └── file4.txt | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | examples/citation_with_extraction/main.py | 132 | CODE | |
| MEDIUM | examples/citation_with_extraction/main.py | 134 | CODE | |
| MEDIUM | examples/citation_with_extraction/main.py | 147 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | examples/tenacity-benchmarks/run.py | 238 | """Extract with comprehensive logging.""" | STRING |
| MEDIUM | examples/caching/run.py | 515 | """Run comprehensive caching demonstration""" | STRING |
| LOW | instructor/v2/core/retry.py | 146 | # No structured output, just call the API | COMMENT |
| LOW | instructor/v2/core/retry.py | 391 | # No structured output, just call the API | COMMENT |
| MEDIUM | instructor/batch/models.py | 96 | """Enhanced unified batch job information with comprehensive provider support""" | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples/classification/classifiy_with_validation.py | 67 | CODE | |
| LOW | examples/situate_context/run.py | 69 | CODE | |
| LOW | examples/caching/run.py | 141 | CODE | |
| LOW | scripts/make_desc.py | 72 | CODE | |
| LOW | instructor/cli/jobs.py | 146 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | examples/simple-extraction/maybe_user.py | 72 | # ! due to the __bool__ method, you can use the MaybeUser object as a boolean | COMMENT |
| MEDIUM | examples/gpt-engineer/program.json | 1 | {"files": [{"file_name": "readme.md", "body": "# FastAPI App\n\nThis is a FastAPI app that provides some basic math func | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples/youtube-clips/run.py | 89 | # Example usage | COMMENT |
| LOW | examples/situate_context/run.py | 125 | # Example usage | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | instructor/distil.py | 48 | >>> def my_function(a: int, b: int) -> int: | STRING |
| LOW | instructor/distil.py | 52 | "def my_function(a: int, b: int) -> int" | STRING |
| LOW | instructor/distil.py | 174 | >>> def my_function() -> MyModel: | STRING |
| LOW | instructor/distil.py | 178 | >>> def my_function() -> MyModel: | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | instructor/v2/dsl/simple_type.py | 68 | # ! TypeError, so we need to check if `response_model` is an Iterable | COMMENT |