Skip to content

Error setting up inference endpoint - "Unknown service [custom]" #135099

@alondahari

Description

@alondahari

Elasticsearch Version

8.18.0

Installed Plugins

No response

Java Version

bundled

OS Version

Ubuntu 20.04

Problem Description

When trying to set up a new custom inference endpoint (following the docs), I'm getting the following error:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "status_exception",
        "reason" : "Unknown service [custom]"
      }
    ],
    "type" : "status_exception",
    "reason" : "Unknown service [custom]"
  },
  "status" : 400
}

Steps to Reproduce

Run the following curl to set up a custom inference endpoint:

curl -v -XPUT  -H "Content-Type: application/json" --user $USER_CREDS \
  'https://<our_cluster>/_inference/text_embedding/test-embeddings?pretty' -d '
 {
   "service": "custom",
   "service_settings": {
      "secret_parameters": {
           "api_key": <API key>
      },
      "url":  "https://<our inference endpoint>.inference.ml.azure.com/v1/embeddings",
      "headers": {
          "Authorization": "Bearer ${api_key}",
          "Content-Type": "application/json"
      },
      "request": "{\"input\": ${input}}",
      "response": {
          "json_parser": {
              "text_embeddings":"$.data[*].embedding[*]"
          }
      }
   }
 }

Logs (if relevant)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    :mlMachine learning>bugTeam:MLMeta label for the ML team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions