Describe the issue: I am trying to configure a RAG agent. As a pre-rq, I am trying to create a connector to an externally hosted llm endpoint for chat completion based on lama.
However, the connector is not able to acquire the connection with in 10 seconds - shows below error with 500 status when trying to do a test run with predict api command.
But the same endpoint is tested and works fine when independently tested on postman, so no issues with the LLM endpoint.
Tried with different client_config params increasing timeouts, connections etc., but still no luck.
Create a connector to the local Ollama and cloud model gpt-oss:120b-cloud
This will require running ollama sigin and registering the cloud model with ollama run gpt-oss:120b-cloud and creating API and Ollama keys in ollama.com
Register a model with the Ollama connector and local model lama3.1:8b
POST /_plugins/_ml/models/_register
{
"name": "ollama",
"function_name": "remote",
"connector_id": "0RDozpkBC2q961VMpSvy"
}
Register a model with the Ollama connector and cloud model gpt-oss:120b-cloud
POST /_plugins/_ml/models/_register
{
"name": "ollama-cloud",
"function_name": "remote",
"connector_id": "1BByz5kBC2q961VMkC2H"
}
Test the model with _predict
POST /_plugins/_ml/models/2hBzz5kBC2q961VMVi0C/_predict
{
"parameters": {
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!What is your name???"
}
]
}
}
Response from cloud model:
{
"inference_results": [
{
"output": [
{
"name": "response",
"dataAsMap": {
"id": "chatcmpl-14",
"object": "chat.completion",
"created": 1760124242,
"model": "gpt-oss:120b-cloud",
"system_fingerprint": "fp_ollama",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! I’m ChatGPT, your friendly AI assistant. How can I help you today?",
"reasoning": """We need to respond. The user says "Hello!What is your name??". We should greet and give name. According to system, we are ChatGPT. The user just asks name. So respond friendly."""
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 73,
"completion_tokens": 72,
"total_tokens": 145
}
}
}
],
"status_code": 200
}
]
}
Response from a local model:
{
"inference_results": [
{
"output": [
{
"name": "response",
"dataAsMap": {
"id": "chatcmpl-679",
"object": "chat.completion",
"created": 1760124278,
"model": "llama3.1:8b",
"system_fingerprint": "fp_ollama",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": """I don't have a personal name, but I'm often referred to as "Assistant" or "AI Assistant". Some people also call me "Nova" (just a nickname!). My main goal is to assist you with any questions, tasks, or topics you'd like to discuss. How can I help you today?"""
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 28,
"completion_tokens": 65,
"total_tokens": 93
}
}
}
],
"status_code": 200
}
]
}