AI models

Streamtime AI (the assistant you chat with, and the investigations it runs on alerts) uses a model you choose, with your own account. Each organization sets its own.

Provider What you need
OpenAI An API key
OpenAI-compatible (self-hosted) The endpoint of your own server (vLLM, Ollama, LiteLLM …), usually ending in /v1, and an API key if it requires one. Streamtime must be able to reach it
Anthropic (Claude) An API key
Groq An API key
Google (Gemini) An API key

Embedding model (optional). To find similar past incidents by meaning, Streamtime also uses an embedding model: OpenAI, OpenAI-compatible servers and Google offer one; Anthropic and Groq don’t. Without it, incidents are matched by alert name and resource only. With OpenAI the default is text-embedding-3-small.

The API key is stored as a secret and only its last four characters are ever shown.

The API examples below share this setup:

export STREAMTIME_TOKEN=<your-access-token>
export API=https://api.example.com/organizations/<org>
import os
from streamtime_sdk.client import AuthenticatedClient

client = AuthenticatedClient(
    base_url="https://api.example.com",
    token=os.environ["STREAMTIME_TOKEN"],
)
ORG = "<org>"

Uses the generated client in streamtime-sdk/typescript/client.

import { client } from "./client/client.gen";

client.setConfig({
  baseUrl: "https://api.example.com",
  headers: { Authorization: `Bearer ${process.env.STREAMTIME_TOKEN}` },
});
const org = "<org>";
package main

import (
    "bytes"
    "crypto/rand"
    "encoding/hex"
    "encoding/json"
    "net/http"
    "os"
)

const api = "https://api.example.com/organizations/<org>"

// newKey returns a random idempotency key.
func newKey() string {
    b := make([]byte, 16)
    rand.Read(b)
    return hex.EncodeToString(b)
}

// call sends one request with the access token and a JSON body (or none).
// An optional idempotency key is sent as the Idempotency-Key header.
func call(method, path string, body any, idempotencyKey ...string) (*http.Response, error) {
    var buf bytes.Buffer
    if body != nil {
        if err := json.NewEncoder(&buf).Encode(body); err != nil {
            return nil, err
        }
    }
    req, err := http.NewRequest(method, api+path, &buf)
    if err != nil {
        return nil, err
    }
    req.Header.Set("Authorization", "Bearer "+os.Getenv("STREAMTIME_TOKEN"))
    req.Header.Set("Content-Type", "application/json")
    if len(idempotencyKey) > 0 {
        req.Header.Set("Idempotency-Key", idempotencyKey[0])
    }
    return http.DefaultClient.Do(req)
}

Choose the model

  1. Open Streamtime AI and its settings. When no model is set, the assistant shows Open AI Model Config.
  2. On the Model tab, choose the Provider.
  3. For OpenAI-compatible (self-hosted), enter the Endpoint URL and turn on Requires an API key if your server needs one.
  4. Enter the API Key. The Model list then loads; choose a model or type its name.
  5. Optionally choose an Embedding model.
  6. Select Save.

The Investigations and Advanced tabs tune how the assistant investigates alerts.

curl -X PUT "$API/assistant/ai-model-config/" \
  -H "Authorization: Bearer $STREAMTIME_TOKEN" -H "Content-Type: application/json" \
  -d '{"provider": "anthropic", "model_name": "<model>", "api_key": "<api-key>"}'

# A self-hosted OpenAI-compatible server: provider "openai" with its endpoint.
curl -X PUT "$API/assistant/ai-model-config/" \
  -H "Authorization: Bearer $STREAMTIME_TOKEN" -H "Content-Type: application/json" \
  -d '{"provider": "openai", "api_endpoint": "https://llm.example.com/v1",
       "model_name": "<model>", "api_key": "<api-key>",
       "embedding_model_name": "<embedding-model>"}'

provider is openai, anthropic, groq or google. GET $API/assistant/ai-model-config/ shows what is set, with the key masked.

from streamtime_sdk.api.assistant import organizations_assistant_ai_model_config_update
from streamtime_sdk.models import StreamtimeAIModelConfigUpdate

organizations_assistant_ai_model_config_update.sync(
    ORG,
    client=client,
    body=StreamtimeAIModelConfigUpdate.from_dict(
        {"provider": "anthropic", "model_name": "<model>", "api_key": "<api-key>"}
    ),
)
import { organizationsAssistantAiModelConfigUpdate } from "./client";

await organizationsAssistantAiModelConfigUpdate({
  path: { org_identifier: org },
  body: { provider: "anthropic", model_name: "<model>", api_key: "<api-key>" },
});
resp, err := call("PUT", "/assistant/ai-model-config/", map[string]any{
    "provider":   "anthropic",
    "model_name": "<model>",
    "api_key":    "<api-key>",
})
if err != nil {
    return err
}
defer resp.Body.Close()

Not available in the CLI yet. Use the console or the API.

Not available in MCP. An MCP client brings its own model; this setting is for Streamtime AI inside the console.