Skip to content

Bug: suppress_parse_errors parameter not accessible through resolver_params #253

@brightertiger

Description

@brightertiger

Bug Description

The suppress_parse_errors parameter cannot be passed through resolver_params in the extract() method, even though it's already implemented in the Resolver.resolve() method.

Expected Behavior

Users should be able to control parsing error handling via:

langextract.extract(
    text_or_documents="Some text",
    prompt_description="Extract entities", 
    examples=[...],
    resolver_params={"suppress_parse_errors": True}  # Should work
)

Actual Behavior

The above code fails to set the value of 'suppress_parse_errors' in Resolver

Root Cause

The suppress_parse_errors parameter is not included in ALIGNMENT_PARAM_KEYS in resolver.py, so it doesn't get properly extracted from resolver_params and routed to the resolve() method.

Impact

  • Users cannot suppress parsing errors through the public API
  • Forces users to handle parsing errors at a higher level
  • Inconsistent with other resolver parameters like enable_fuzzy_alignment

Proposed Solution

Add "suppress_parse_errors" to ALIGNMENT_PARAM_KEYS in resolver.py to enable proper parameter routing.

Environment

  • LangExtract version: Latest main branch
  • Python version: Any
  • OS: Any

Additional Context

The suppress_parse_errors functionality is already fully implemented in Resolver.resolve() - it just needs to be properly exposed through the parameter routing system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions