Skip to content

fix(cohere): omit null document when return_documents=false#13

Merged
joonsoome merged 1 commit into
mainfrom
fix/cohere-null-document
Nov 14, 2025
Merged

fix(cohere): omit null document when return_documents=false#13
joonsoome merged 1 commit into
mainfrom
fix/cohere-null-document

Conversation

@joonsoome

Copy link
Copy Markdown
Owner

Fixed

  • Cohere-compatible rerank endpoints now omit the document field entirely when return_documents is false, instead of returning document: null. This avoids validation errors in strict clients (e.g. LiteLLM’s RerankResponse schema).
  • Cohere v2 rerank tests tightened to assert that document is absent when return_documents=false, preventing regressions.

Changed

  • Example .env.example updated to reflect the current default configuration (MLX Qwen3 embedding model, DIMENSION_STRATEGY=hidden_size, and clarified reranker settings).

Thanks for the bug report @oatmealm

#11

@joonsoome
joonsoome merged commit 0ee45b4 into main Nov 14, 2025
1 check passed
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