Skip to content

v0.29.2

Choose a tag to compare

@mariusvniekerk mariusvniekerk released this 01 Oct 13:18
9be3cef

This patch release lets embedding callers tell a rejected input from a misconfigured endpoint, so a wrong model name or unsupported field no longer looks like a corpus of bad documents.

Upgrade notes:

  • embedclient.APIError has a new Reason field. Kit sets it from the HTTP status and, for 400, 413 and 422, from the provider's error code or message, which it then discards. Body text never appears in the error. (#138)
  • InputRejected is now true only when the reason is input too long or content policy. A 400 that does not name an input problem, such as an unknown model, an unsupported dimensions field or an unrecognized message, is no longer an input rejection. Code or tests that build APIError{StatusCode: 400} and expect InputRejected() to be true must now set Reason. CredentialsRejected and Retryable still read the status alone. (#138)

Full changelog