Skip to content

Conversation

@wxh06
Copy link

@wxh06 wxh06 commented Dec 6, 2025

Some OpenAI-compatible embedding APIs reject the dimensions parameter despite not being standard OpenAI, causing requests to fail when output_dimension is specified.

I separated output_dimension (sent to API) from expected_output_dimension (used for validation and schema), allowing flexible dimension handling without forcing the API parameter.

wxh06 added 2 commits December 6, 2025 00:31
Separate API parameter (output_dimension) from validation dimension (expected_output_dimension) for clearer semantics and better flexibility.

Maintains backward compatibility with fallback to output_dimension when expected_output_dimension is not specified.
Add warning when output_dimension and expected_output_dimension are both specified with different values, explaining their respective uses in schema definition vs API request.
@wxh06 wxh06 changed the title feat(embed_text): add expected_output_dimension parameter feat(embed_text): add expected_output_dimension parameter Dec 6, 2025
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.

1 participant