structured outputs for llms
This report summarizes scanner evidence for 567-labs/instructor, a Python project with 13,996 GitHub stars. SynthScan examined 147,686 lines of code across 895 source files, recording 2622 pattern matches distributed across 26 syntactic categories. The legacy adjusted pattern signal is 26.4 (Elevated pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 1616 finding(s).
Are imports declared and package/API names verified? 564 finding(s).
Are wrappers, guards, and repeated structures necessary? 1743 finding(s).
Which changes need focused human review? 2622 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 2622 distinct pattern matches across 26 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| 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_lazy_imports.py | 82 | def test_auto_client_keeps_bedrock_provider_lazy(): | 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_prepare_release.py | 69 | def test_prepare_release_validates_and_extracts_notes(tmp_path: Path) -> None: | STRING |
| LOW | tests/test_prepare_release.py | 81 | def test_prepare_release_rejects_expected_version_mismatch(tmp_path: Path) -> None: | STRING |
| LOW | tests/test_prepare_release.py | 90 | def test_prepare_release_rejects_duplicate_release_sections(tmp_path: Path) -> None: | STRING |
| LOW | tests/test_prepare_release.py | 102 | def test_prepare_release_rejects_lockfile_version_drift(tmp_path: Path) -> None: | STRING |
| LOW | tests/test_prepare_release.py | 115 | def test_prepare_release_rejects_runtime_version_drift(tmp_path: Path) -> None: | STRING |
| LOW | tests/test_prepare_release.py | 127 | def test_prepare_release_requires_single_runtime_version(tmp_path: Path) -> None: | STRING |
| LOW | tests/test_prepare_release.py | 137 | def test_prepare_release_requires_comparison_link(tmp_path: Path) -> None: | STRING |
| LOW | tests/test_prepare_release.py | 150 | def test_prepare_release_rejects_stale_repository_url(tmp_path: Path) -> None: | STRING |
| 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 | 35 | def test_responses_tools_preserves_function_description() -> None: | CODE |
| LOW | tests/test_openai_responses_tools.py | 45 | def test_responses_tools_sets_text_format() -> None: | CODE |
| LOW | tests/test_openai_responses_tools.py | 56 | def test_responses_tools_overrides_conflicting_text_format() -> None: | CODE |
| LOW | tests/test_openai_responses_tools.py | 79 | def test_responses_tools_preserves_matching_text_format() -> None: | CODE |
| LOW | tests/test_openai_responses_tools.py | 97 | def test_responses_tools_none_model_no_text() -> None: | CODE |
| LOW | tests/test_openai_responses_tools.py | 115 | def test_reask_responses_tools_empty_args_message() -> None: | CODE |
| LOW | tests/test_openai_responses_tools.py | 129 | def test_reask_responses_tools_nonempty_args_message() -> None: | CODE |
| LOW | tests/test_openai_responses_tools.py | 142 | def test_reask_responses_tools_none_arguments() -> None: | CODE |
| LOW | tests/test_openai_responses_tools.py | 151 | def test_reask_responses_tools_no_tool_calls_adds_fallback_message() -> None: | CODE |
| LOW⚡ | tests/test_openai_responses_tools.py | 183 | def test_responses_tools_overrides_text_type_format() -> None: | CODE |
| LOW⚡ | tests/test_openai_responses_tools.py | 193 | def test_parse_response_warns_on_empty_args(caplog) -> None: | CODE |
| LOW⚡ | tests/test_openai_responses_tools.py | 210 | def test_incomplete_responses_fail_before_validation( | CODE |
| 1236 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_prepare_release.py | 1 | CODE | |
| LOW | tests/test_openai_responses_tools.py | 1 | CODE | |
| LOW | tests/test_usage_accounting_contracts.py | 8 | CODE | |
| LOW | tests/test_streaming_reasoning_events.py | 10 | CODE | |
| LOW | tests/test_llm_validator_allow_override.py | 8 | CODE | |
| LOW | tests/test_import_lazy_openai.py | 3 | CODE | |
| LOW | tests/test_batch_processor_coverage.py | 3 | CODE | |
| LOW | tests/test_usage_accounting_audit.py | 11 | CODE | |
| LOW | tests/packaging/contract.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/llm/test_decisions/conftest.py | 1 | CODE | |
| LOW | tests/llm/test_decisions/test_live_decisions.py | 3 | CODE | |
| LOW | tests/core/test_retry_http_semantics.py | 3 | CODE | |
| LOW | tests/processing/test_list_response_wrapper.py | 1 | CODE | |
| LOW | tests/processing/test_formatting.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_genai_cached_content_release.py | 1 | CODE | |
| LOW | tests/v2/test_responses_sdk_contract.py | 3 | CODE | |
| LOW | tests/v2/test_security_regressions.py | 3 | CODE | |
| LOW | tests/v2/test_xai_client.py | 7 | CODE | |
| LOW | tests/v2/test_parallel_contracts.py | 1 | CODE | |
| LOW | tests/v2/test_json_stream_bounds.py | 1 | 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_retry_budget.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_genai_config_reuse.py | 1 | CODE | |
| LOW | tests/v2/test_request_local_streaming.py | 3 | CODE | |
| LOW | tests/v2/test_async_validators_execution.py | 3 | CODE | |
| LOW | tests/v2/test_vertexai_runtime.py | 1 | CODE | |
| LOW | tests/v2/test_mode_normalization.py | 1 | CODE | |
| LOW | tests/v2/test_remote_fetch.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 | |
| 387 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 | 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 | 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 | 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 |
| 12 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 |
| 26 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 | 232 | from instructor.core.exceptions import ConfigurationError | CODE |
| CRITICAL⚡ | tests/providers/test_auto_client.py | 241 | from instructor.core.exceptions import ConfigurationError | CODE |
| CRITICAL | tests/providers/test_auto_client.py | 456 | from instructor.core.exceptions import ConfigurationError | CODE |
| CRITICAL | tests/providers/test_auto_client.py | 477 | 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 | 63 | from instructor.core.exceptions import ClientError | CODE |
| CRITICAL⚡ | tests/v2/test_bedrock_client.py | 76 | from instructor.core.exceptions import ClientError | CODE |
| CRITICAL⚡ | tests/v2/test_bedrock_client.py | 90 | 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 | 95 | from instructor.core.exceptions import ValidationError | CODE |
| CRITICAL | docs/concepts/error_handling.md | 126 | from instructor.core.exceptions import ConfigurationError, ModeError | CODE |
| CRITICAL | docs/concepts/error_handling.md | 193 | from instructor.core.exceptions import InstructorError | CODE |
| CRITICAL | docs/concepts/error_handling.md | 217 | from instructor.core.exceptions import ValidationError, InstructorRetryException | CODE |
| CRITICAL | docs/concepts/error_handling.md | 261 | from instructor.core.exceptions import ResponseParsingError | CODE |
| CRITICAL | docs/concepts/error_handling.md | 296 | from instructor.core.exceptions import ValidationError | CODE |
| CRITICAL | docs/concepts/from_provider.md | 229 | 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 | 202 | 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 | 196 | except Exception as e: | CODE |
| LOW⚡ | tests/providers/test_auto_client.py | 213 | except Exception as e: | CODE |
| LOW⚡ | tests/providers/test_auto_client.py | 224 | except Exception as e: | CODE |
| LOW | tests/providers/test_auto_client.py | 185 | 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 | 131 | print("Error: Install the anthropic package first") | CODE |
| LOW | docs/integrations/xai.md | 210 | except Exception as e: | STRING |
| MEDIUM | docs/integrations/xai.md | 211 | print(f"Error: {e}") | STRING |
| LOW | docs/integrations/anthropic.md | 98 | except Exception as e: | CODE |
| LOW | docs/integrations/anthropic.md | 390 | except Exception as e: | CODE |
| MEDIUM | docs/integrations/anthropic.md | 391 | print(f"Error during streaming: {e}") | CODE |
| LOW | docs/integrations/anthropic.md | 450 | except Exception as e: | STRING |
| MEDIUM | docs/integrations/anthropic.md | 451 | print(f"Error during iteration: {e}") | STRING |
| LOW | docs/integrations/anthropic.md | 552 | except Exception as e: | CODE |
| MEDIUM | docs/integrations/anthropic.md | 553 | print(f"Error: {e}") | CODE |
| LOW | docs/integrations/anthropic.md | 631 | except Exception as e: | CODE |
| MEDIUM | docs/integrations/anthropic.md | 632 | 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 | 278 | print(f"Error: {e}") | CODE |
| LOW | docs/concepts/semantic_validation.md | 153 | except Exception as e: | CODE |
| LOW | docs/concepts/retrying.md | 176 | except Exception as e: | CODE |
| MEDIUM | docs/concepts/hooks.md | 139 | print(f"Error #{self.count}: {type(error).__name__}: {error}") | CODE |
| LOW | docs/concepts/hooks.md | 160 | except Exception as e: | CODE |
| MEDIUM | docs/concepts/batch.md | 181 | 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 |
| 133 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 | 143 | export GROQ_API_KEY="your-api-key" | CODE |
| HIGH | docs/blog/posts/open_source.md | 188 | export TOGETHER_API_KEY="your-api-key" | CODE |
| HIGH | docs/blog/posts/open_source.md | 238 | client = Mistral(api_key="your-api-key-here") | 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 | 31 | export XAI_API_KEY='your-api-key-here' | CODE |
| HIGH | docs/integrations/xai.md | 191 | export XAI_API_KEY="your-api-key-here" | STRING |
| HIGH | docs/integrations/anthropic.md | 38 | # os.environ["ANTHROPIC_API_KEY"] = "your-api-key" # Uncomment and replace with your API key if not set | COMMENT |
| HIGH | docs/integrations/anthropic.md | 353 | # os.environ["ANTHROPIC_API_KEY"] = "your-api-key" # Uncomment and replace with your API key if not set | COMMENT |
| HIGH | docs/integrations/anthropic.md | 406 | # 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 | 568 | # 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 | 26 | export OPENAI_API_KEY='your-api-key-here' | CODE |
| HIGH | docs/integrations/openai.md | 36 | api_key='your-api-key-here', | CODE |
| HIGH | docs/integrations/mistral.md | 36 | 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 | 347 | "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 | 424 | 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 | 799 | "Set it with `export MISTRAL_API_KEY=<your-api-key>`." | CODE |
| HIGH | instructor/v2/auto_client.py | 899 | "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 | 1362 | "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 | 1485 | "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 | 99 | Create an Instructor client from a model string. Args: model: String in format "provider/model-name" | STRING |
| HIGH | instructor/v2/core/patch.py | 89 | 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 | 131 | 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 | 226 | 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 | 462 | 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 | 157 | Asynchronously process and transform LLM responses into structured models. This function is the async entry point f | STRING |
| HIGH | instructor/v2/core/response.py | 266 | Process and transform LLM responses into structured models (synchronous). This is the main entry point for converti | STRING |
| HIGH | instructor/v2/core/response.py | 444 | Compatibility dispatcher for provider-specific reask formatting. The retry loop itself lives in :mod:`instructor.v2 | STRING |
| HIGH | instructor/v2/core/retry.py | 151 | Sync retry logic using v2 registry handlers. Args: func: API function to call response_model: Pydan | STRING |
| HIGH | instructor/v2/core/retry.py | 450 | 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 | 171 | 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 | 55 | 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 | 83 | 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 |
| HIGH | instructor/batch/processor.py | 48 | Create batch file from list of message conversations Args: messages_list: List of message conversat | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/providers/test_auto_client.py | 454 | CODE | |
| LOW | tests/providers/test_auto_client.py | 475 | CODE | |
| LOW | tests/providers/test_auto_client.py | 599 | CODE | |
| LOW | tests/providers/test_auto_client.py | 637 | CODE | |
| LOW | tests/v2/test_json_stream_bounds.py | 220 | CODE | |
| LOW | tests/v2/test_handlers_parametrized.py | 501 | CODE | |
| LOW | tests/v2/test_handlers_parametrized.py | 538 | CODE | |
| LOW | tests/v2/test_retry_isolation_contract.py | 116 | CODE | |
| LOW | tests/v2/decisions/test_openai_decisions.py | 138 | CODE | |
| LOW | tests/multimodal/test_multimodal.py | 381 | 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/provider_test_evidence.py | 12 | 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/cache/__init__.py | 183 | CODE | |
| LOW | instructor/cache/__init__.py | 274 | CODE | |
| LOW | instructor/cache/__init__.py | 314 | 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 | 153 | CODE | |
| LOW | instructor/decisions/openai.py | 15 | CODE | |
| LOW | instructor/decisions/schema.py | 84 | CODE | |
| LOW | instructor/decisions/schema.py | 134 | CODE | |
| LOW | instructor/decisions/schema.py | 95 | CODE | |
| LOW | instructor/v2/core/patch.py | 185 | CODE | |
| LOW | instructor/v2/core/patch.py | 309 | CODE | |
| LOW | instructor/v2/core/patch.py | 195 | CODE | |
| LOW | instructor/v2/core/patch.py | 319 | CODE | |
| LOW | instructor/v2/core/hooks.py | 150 | CODE | |
| LOW | instructor/v2/core/remote.py | 168 | CODE | |
| LOW | instructor/v2/core/multimodal.py | 726 | CODE | |
| LOW | instructor/v2/core/multimodal.py | 815 | CODE | |
| LOW | instructor/v2/core/multimodal.py | 183 | CODE | |
| LOW | instructor/v2/core/multimodal.py | 637 | CODE | |
| LOW | instructor/v2/core/retry.py | 138 | CODE | |
| LOW | instructor/v2/core/retry.py | 437 | CODE | |
| LOW | instructor/v2/core/messages.py | 51 | CODE | |
| LOW | instructor/v2/core/messages.py | 72 | CODE | |
| LOW | instructor/v2/core/json.py | 13 | CODE | |
| LOW | instructor/v2/core/json.py | 60 | CODE | |
| LOW | instructor/v2/core/json.py | 166 | CODE | |
| 57 more matches not shown… | ||||
| 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 | 578 | # Create a mock google module | COMMENT |
| MEDIUM | tests/providers/test_auto_client.py | 656 | # Create a mock google module with genai attribute | COMMENT |
| MEDIUM | tests/v2/test_handlers_parametrized.py | 358 | # 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/function_calls.py | 603 | # 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 |
|---|---|---|---|---|
| HIGH | tests/test_openai_responses_tools.py | 202 | except Exception: | CODE |
| HIGH | tests/core/test_retry_http_semantics.py | 93 | except (BrokenPipeError, ConnectionResetError): | CODE |
| HIGH | tests/v2/test_issue_2374.py | 49 | except Exception: | CODE |
| HIGH | tests/v2/test_issue_2374.py | 67 | except Exception: | CODE |
| HIGH | scripts/check_links.py | 105 | except Exception: | CODE |
| HIGH | instructor/v2/core/patch.py | 301 | except ModuleNotFoundError: | CODE |
| HIGH | instructor/v2/core/patch.py | 425 | except ModuleNotFoundError: | CODE |
| HIGH | instructor/v2/core/remote.py | 115 | except ValueError: | CODE |
| HIGH | instructor/v2/core/multimodal.py | 102 | except OSError: | CODE |
| HIGH | instructor/v2/core/multimodal.py | 292 | except OSError: | CODE |
| HIGH | instructor/v2/core/function_calls.py | 81 | except (AttributeError, IndexError): | CODE |
| HIGH | instructor/v2/core/usage.py | 140 | except ImportError: | CODE |
| HIGH | instructor/v2/providers/openai/handlers.py | 513 | except (TypeError, ValueError): | CODE |
| HIGH | instructor/v2/dsl/iterable.py | 149 | except Exception: | CODE |
| HIGH | instructor/v2/dsl/json_tracker.py | 69 | except ValueError: | CODE |
| HIGH | instructor/v2/dsl/simple_type.py | 95 | except TypeError: | CODE |
| HIGH | instructor/batch/__init__.py | 151 | except Exception: | CODE |
| 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 | 38 | __all__ = [ | CODE |
| LOW | instructor/core/__init__.py | 25 | __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/decisions/__init__.py | 5 | __all__ = ["Choice", "Choices", "Level", "Noul", "Question", "Score"] | 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 | 429 | __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 | 743 | __all__ = [ | CODE |
| LOW | instructor/v2/providers/xai/__init__.py | 11 | __all__ = ["from_xai"] | CODE |
| LOW | instructor/v2/providers/bedrock/client.py | 218 | __all__ = ["from_bedrock"] | CODE |
| LOW | instructor/v2/providers/bedrock/handlers.py | 738 | __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 | 872 | __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 | 587 | __all__ = [ | CODE |
| 11 more matches not shown… | ||||
| 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 | 124 | assert response.name == "John Doe" | CODE |
| LOW | tests/llm/test_genai/test_invalid_schema.py | 192 | 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 | tests/v2/test_openai_streaming.py | 97 | stream_factory('{"name": "Jane Doe"}'), response_model, stream=True | CODE |
| LOW | tests/v2/test_openai_streaming.py | 100 | assert result[-1].name == "Jane Doe" | 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 | 205 | #> name='John Doe' age=None | 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=30 | COMMENT |
| LOW⚡ | docs/blog/posts/version-1.md | 210 | #> name='John Doe' age=30 | COMMENT |
| LOW⚡ | docs/blog/posts/version-1.md | 214 | # name='John Doe' age=None | COMMENT |
| LOW⚡ | docs/blog/posts/version-1.md | 215 | # name='John Doe' age=30 | COMMENT |
| LOW⚡ | docs/blog/posts/version-1.md | 248 | #> name='John Doe' age=30 | COMMENT |
| LOW⚡ | docs/blog/posts/version-1.md | 249 | #> name='Jane Doe' age=28 | COMMENT |
| LOW⚡ | docs/blog/posts/version-1.md | 250 | # User(name='John Doe', age=30) | COMMENT |
| LOW | docs/blog/posts/using_json.md | 77 | # "name": "John Doe", | COMMENT |
| LOW | docs/integrations/deepseek.md | 152 | #> 'street': '123 Main St', | STRING |
| LOW | docs/integrations/fireworks.md | 132 | #> 'street': '123 Main St', | STRING |
| LOW | docs/integrations/writer.md | 125 | #> 'street': '123 Main St', | STRING |
| LOW | docs/integrations/xai.md | 139 | #> 'street': '123 Main St', | STRING |
| LOW | docs/integrations/anthropic.md | 83 | # "name": "John Doe", | COMMENT |
| LOW | docs/integrations/groq.md | 143 | #> 'street': '123 Main St', | STRING |
| LOW | docs/integrations/openai.md | 228 | #> 'street': '123 Main St', | STRING |
| LOW | docs/integrations/bedrock.md | 300 | #> Address(street='123 Main St', city='New York', country='USA'), | STRING |
| LOW | docs/integrations/mistral.md | 179 | # 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 | 161 | #> 'street': '123 Main St', | STRING |
| LOW | docs/integrations/google.md | 235 | #> 'street': '123 Main St', | STRING |
| LOW | docs/integrations/perplexity.md | 141 | #> Address(street='123 Main St', city='New York', country='USA'), | STRING |
| LOW | docs/integrations/openrouter.md | 133 | #> 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 |
|---|---|---|---|---|
| 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/cli/batch.py | 194 | # Check if required API key is available for the provider | COMMENT |
| LOW | instructor/v2/auto_client.py | 1303 | # 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 | 347 | # Check if handlers are registered | COMMENT |
| LOW | instructor/v2/core/client.py | 816 | # Check if the response model is an iterable type | COMMENT |
| LOW | instructor/v2/core/multimodal.py | 557 | # 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 | 121 | # Check if mistralai is installed | COMMENT |
| LOW | instructor/v2/dsl/simple_type.py | 91 | # 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 | 239 | # Check if this is a provider error response | COMMENT |
| LOW | instructor/batch/processor.py | 293 | # Check if result is an error | 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_optional_lists.py | 100 | [('{"items":null,', None), ('{"items":[],', []), ("{", None)], | CODE |
| HIGH⚡ | tests/dsl/test_partial_optional_lists.py | 168 | chunks = ['{"items":[null,{"name":"Alice","age":30}],', '"note":"done"}'] | CODE |
| 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 |
|---|---|---|---|---|
| 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 | 119 | ### 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 | 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 | COMMENT |
| LOW | requirements.txt | 61 | mdurl==0.1.2 | COMMENT |
| LOW | requirements.txt | 81 | pygments==2.21.0 | COMMENT |
| LOW | requirements.txt | 101 | typer==0.27.1 | COMMENT |
| LOW | docs/blog/posts/version-1.md | 201 | #> name=None age=None | 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/deepseek.md | 141 | ], | COMMENT |
| LOW | docs/integrations/fireworks.md | 121 | } | COMMENT |
| LOW | docs/integrations/writer.md | 121 | #> 'name': 'Jason', | COMMENT |
| LOW | docs/integrations/anthropic.md | 81 | # Expected output: | COMMENT |
| LOW | docs/integrations/anthropic.md | 221 | Image.from_url(url), | COMMENT |
| LOW | docs/integrations/groq.md | 141 | #> 'addresses': [ | COMMENT |
| LOW | docs/integrations/openai.md | 221 | COMMENT | |
| LOW | docs/integrations/cortex.md | 141 | #> 'addresses': [ | COMMENT |
| LOW | docs/integrations/cerebras.md | 161 | #> 'street': '123 Main St', | 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 | 183 | # No structured output, just call the API | COMMENT |
| LOW | instructor/v2/core/retry.py | 482 | # 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 | 153 | 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 | 69 | # ! TypeError, so we need to check if `response_model` is an Iterable | COMMENT |