Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

Fix content type header when calling Hypermode-hosted models#248

Merged
mattjohnsonpint merged 2 commits intomainfrom
mjp/fix-content-type
Jun 23, 2024
Merged

Fix content type header when calling Hypermode-hosted models#248
mattjohnsonpint merged 2 commits intomainfrom
mjp/fix-content-type

Conversation

@mattjohnsonpint
Copy link
Contributor

Fixes HYP-1526

@mattjohnsonpint mattjohnsonpint requested a review from a team June 23, 2024 01:05
@linear
Copy link

linear bot commented Jun 23, 2024

HYP-1526 Runtime doesn't set JSON content type for KServe with new model interface

All calls to KServe need the Content-Type: application/json header. This is missing for calls made through the new model interface.

Without it, the error in Axiom is:

{
  "level": "error",
  "runtime_version": "v0.9.0",
  "execution_id": "cprn3u4gs0al64hihd40",
  "build_id": "cprlo6oss1p0cuokimag",
  "plugin": "sample",
  "error": "HTTP error: 500 Internal Server Error\n{\"error\":\"ValueError : You need to specify either `text` or `text_target`.\"}",
  "time": "2024-06-23T00:53:12.441Z",
  "message": "Error posting to model endpoint."
}

@mattjohnsonpint mattjohnsonpint enabled auto-merge (squash) June 23, 2024 01:05
@mattjohnsonpint mattjohnsonpint merged commit 3781b86 into main Jun 23, 2024
@mattjohnsonpint mattjohnsonpint deleted the mjp/fix-content-type branch June 23, 2024 01:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants