bots-garden/mini-mepublic Fork
⑂ feature/open-terminal
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/mini-me.git
git clone ssh://git@rickub.com/bots-garden/mini-me.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP
🛟 Updated. 8d1c5cb · on feature/open-terminal · k33g · yesterday
run-with-an-openai-compatible-server.md · 44 lines · 2.4 KBmarkdown
Blame HistoryOpen raw

How to use any OpenAI-compatible server

This guide shows how to run mini-me on a model server that has no dedicated provider — the OpenAI API itself, vLLM, LM Studio, OpenRouter, a company gateway — with the generic openai provider. It assumes the server speaks the OpenAI chat-completions protocol and supports tool calls.

Steps

  1. Point the agent at the server, in its YAML:

    provider: openai
    model: my-model                       # as the server names it: GET <baseUrl>/models
    baseUrl: http://localhost:8000/v1     # omit it for the OpenAI API
    contextWindow: 32768                  # the window the server serves: this provider cannot ask for it
    
  2. If the server needs a key, export it — it never goes in the YAML:

    export OPENAI_API_KEY=sk-…
    

    Another variable name: apiKeyEnv: MY_GATEWAY_KEY.

  3. Start mm as usual (mm agent.yaml, mm -tui agent.yaml, mm -acp). Checked with llmman's OpenAI address used as a generic server: the start-up probe lists the models, and a bash tool call runs:

    🛠️  bash: echo hello-from-openai-provider
       │ hello-from-openai-provider
    🤖 The command printed: `hello-from-openai-provider`
    

mm init --provider openai --base-url <address> writes such a file for you (see Create an agent with mm init).

Variants

  • The OpenAI API. No baseUrl, OPENAI_API_KEY exported, a model such as gpt-5-mini. Its reasoning models accept only the default temperature and take max_completion_tokens instead of max_tokens: write those in sampling, and remove a key the API refuses. (Not measured in this repository.)
  • The key is refused. The start-up warning says openai: <baseUrl> refused the key (HTTP 401) — export OPENAI_API_KEY.
  • Nothing answers. The warning says openai: nothing answers at <baseUrl> — check baseUrl: …: the address must be the OpenAI-compatible one, usually ending in /v1.
  • A server mm has a provider for. Prefer it (dmr, llamacpp, llmman, ollama): those know how the server reads a long prompt, turns reasoning off for a summary, unloads a model, and tell the window size. The generic provider does none of that.

See also

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# How to use any OpenAI-compatible server

This guide shows how to run mini-me on a model server that has no dedicated provider — the OpenAI API itself, vLLM, LM Studio, OpenRouter, a company gateway — with the generic `openai` provider. It assumes the server speaks the OpenAI chat-completions protocol and supports tool calls.

## Steps

1. Point the agent at the server, in its YAML:

   ```yaml
   provider: openai
   model: my-model                       # as the server names it: GET <baseUrl>/models
   baseUrl: http://localhost:8000/v1     # omit it for the OpenAI API
   contextWindow: 32768                  # the window the server serves: this provider cannot ask for it
   ```

2. If the server needs a key, export it — it never goes in the YAML:

   ```bash
   export OPENAI_API_KEY=sk-…
   ```

   Another variable name: `apiKeyEnv: MY_GATEWAY_KEY`.

3. Start mm as usual (`mm agent.yaml`, `mm -tui agent.yaml`, `mm -acp`). Checked with llmman's OpenAI address used as a generic server: the start-up probe lists the models, and a `bash` tool call runs:

   ```text
   🛠️  bash: echo hello-from-openai-provider
      │ hello-from-openai-provider
   🤖 The command printed: `hello-from-openai-provider`
   ```

`mm init --provider openai --base-url <address>` writes such a file for you (see [Create an agent with `mm init`](create-an-agent.md)).

## Variants

- **The OpenAI API.** No `baseUrl`, `OPENAI_API_KEY` exported, a model such as `gpt-5-mini`. Its reasoning models accept only the default temperature and take `max_completion_tokens` instead of `max_tokens`: write those in `sampling`, and remove a key the API refuses. (Not measured in this repository.)
- **The key is refused.** The start-up warning says `openai: <baseUrl> refused the key (HTTP 401) — export OPENAI_API_KEY`.
- **Nothing answers.** The warning says `openai: nothing answers at <baseUrl> — check baseUrl: …`: the address must be the OpenAI-compatible one, usually ending in `/v1`.
- **A server mm has a provider for.** Prefer it (`dmr`, `llamacpp`, `llmman`, `ollama`): those know how the server reads a long prompt, turns reasoning off for a summary, unloads a model, and tell the window size. The generic provider does none of that.

## See also

- [Configuration reference — provider defaults](../reference/configuration.md#provider-defaults): what `openai` sends and does not
- [Providers — explanation](../explanation/providers.md)