Skip to content

✨ pass text context to chained model - #287

Merged
ianardee merged 1 commit into
mainfrom
extraction-text-context
Dec 3, 2026
Merged

ianardee merged 1 commit into
mainfrom
extraction-text-context

Conversation

@ianardee

@ianardee ianardee commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Description

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires a change to the official Guide documentation.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Parameter loading silently discards string-keyed extraction context and converts invalid false values to nil, bypassing constructor validation.

2 open issues
What changed in this PR

Adds text context support for extraction models chained to V2 classification, crop, and split utilities.

Changes:

  • Introduces shared context validation and request serialization.
  • Updates utility parameters and matching Ruby type signatures.
  • Expands parameter tests and clarifies a code-conversion example.
File Description
spec/​v2/​product/​split/​split_parameter_spec.rb Tests split parameters and context validation.
spec/​v2/​product/​ocr/​ocr_parameter_spec.rb Adds OCR parameter tests.
spec/​v2/​product/​extraction/​extraction_parameter_spec.rb Expands extraction parameter coverage.
spec/​v2/​product/​crop/​crop_parameter_spec.rb Tests crop parameters and context validation.
spec/​v2/​product/​classification/​classification_parameter_spec.rb Tests classification parameters and context validation.
sig/​mindee/​v2/​product/​split/​params/​split_parameters.rbs Declares split context support.
sig/​mindee/​v2/​product/​crop/​params/​crop_parameters.rbs Declares crop context support.
sig/​mindee/​v2/​product/​classification/​params/​classification_parameters.rbs Declares classification context support.
sig/​mindee/​v2/​client_options/​base_classifier_product_parameters.rbs Types the new shared parameter class.
lib/​mindee/​v2/​product/​split/​params/​split_parameters.rb Accepts chained extraction context.
lib/​mindee/​v2/​product/​crop/​params/​crop_parameters.rb Accepts chained extraction context.
lib/​mindee/​v2/​product/​classification/​params/​classification_parameters.rb Accepts chained extraction context.
lib/​mindee/​v2/​client_options/​base_classifier_product_parameters.rb Adds shared context handling.
lib/​mindee/​v2/​client_options.rb Loads the new parameter class.
AGENTS.md Adds a C# naming-conversion example.

Review effort: Balanced

@ianardee
ianardee merged commit 43a969f into main Dec 3, 2026
25 of 29 checks passed
@ianardee
ianardee deleted the extraction-text-context branch December 3, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants