About
AI Hub
AI Hub is a chat panel for OpenAI-compatible providers. It brings local gateways, cheap inference clouds and hosted models into one transcript with a model picker, streaming replies and optional tool calls.
Plugin
| Field | Value |
|---|---|
| ID | robpidev/ai-hub |
| Entries | Bar widget: status; panel: chat; service: brain |
Requirements
Noctalia with plugin API version 43 or newer is required. No extra packages need
to be installed. When tools are enabled, run_command executes the model's
command through /bin/sh -c via Noctalia's noctalia.runAsync() API.
An OpenAI-compatible endpoint is needed: a local server such as OmniRoute, Ollama
or LM Studio works without a key, while hosted providers need an account and an
API key. Keys can also be reused from an existing OpenCode auth.json.
Usage
Add the bar widget robpidev/ai-hub:status to a bar to get a status icon that
opens the panel on click. The brain service starts automatically and owns the
conversation, so the same transcript appears every time the panel is reopened
while the service is running. The transcript is kept in memory and is not
persisted across Noctalia restarts or plugin reloads.
Open the panel directly with:
noctalia msg panel-toggle robpidev/ai-hub:chat
Type in the composer and press Enter to send. Shift+Enter inserts a newline. While a reply is streaming, the send button becomes a stop button; stopping keeps the text produced so far. Pick a model from the dropdown at the top of the panel, use the plug button to test the connection, and the trash button to clear the conversation. Older messages are available through the Show more button at the top of the transcript.
Each message has a copy button. Fenced code blocks have their own copy button
that copies only the code. Tools must be enabled explicitly with
tool_permission. Every run_command call shows an approve/deny prompt with the
full command in a scrollable view; web_search is auto-approved only when
tool_permission is allow.
Settings
| Setting | Type | Default | Description |
|---|---|---|---|
provider |
select |
omniroute |
Preset that fills in the base URL. |
endpoint |
string |
"" |
Overrides the base URL. Trailing slashes and /chat/completions are normalised. |
api_key |
string |
"" |
Bearer token. Empty means no Authorization header is sent. |
key_source |
select |
manual |
Use the typed key or reuse one from OpenCode auth.json. |
auth_provider |
string |
"" |
Credential name in auth.json; leave empty when there is only one. |
model |
string |
"" |
Default model id. The panel dropdown overrides and remembers the choice. |
stream |
bool |
true |
Stream tokens with Server-Sent Events. |
tool_permission |
select |
off |
Tool access: off disables tools, ask prompts for every call, allow auto-approves web_search only. run_command always requires approval. |
web_search |
bool |
false |
Also offer the web_search tool. Tools still require tool_permission to be ask or allow. |
tool_blocklist |
string_list |
See manifest | Substrings rejected before execution. A convenience guardrail, not a security boundary: it does not parse shell syntax. |
max_tokens |
int |
0 |
Maximum tokens per reply. 0 leaves the choice to the server. |
max_history |
int |
40 |
Number of transcript entries sent as context on each turn. |
system_prompt |
string |
"" |
Optional system message prepended to every request. |
key_store_mode |
select |
per_provider |
Store one key per provider or a single global key. In per_provider mode a typed key is bound to the provider/endpoint it was entered for and is not sent after switching elsewhere. |
The bar widget also has a glyph entry setting (default sparkles) for its
icon.
IPC
The service accepts these events through noctalia msg plugin robpidev/ai-hub:brain all <event> [payload]:
| Event | Payload | Effect |
|---|---|---|
send / ask |
Message text | Start a new turn. |
clear |
none | Erase the conversation and reset the session. |
stop |
none | Cancel the in-flight request. |
models |
none | Refresh the model list. |
test |
none | Test the endpoint and show a notification. |
model |
Model id | Select a model. |
ping |
none | Show an "alive" notification. |
dump |
none | Write a bug-report JSON file. |
Example:
noctalia msg plugin robpidev/ai-hub:brain all dump
The dump file is written to
~/.local/state/noctalia/plugins/data/robpidev/ai-hub/dump.json. It contains the
transcript, state and resolved configuration, but never the API key itself.
Notes
- Network access: requests go to the configured OpenAI-compatible endpoint.
With
web_searchenabled, the plugin also fetches DuckDuckGo's HTML search page; the host is fixed by the plugin, not chosen by the model. Tool results are passed back to the model as untrusted text. - Files: credentials, the selected model and the installation id are stored in
state.jsonunder the plugin data directory; thedumpevent writesdump.json. OpenCode'sauth.jsonis read whenever provider information is published, even when it is not the selected key source; only credential names are published, never the keys. - Processes: with
tool_permissionset toaskorallow, therun_commandtool can execute shell commands through/bin/sh -cvianoctalia.runAsync()after approval and a substring blocklist check. Approval is required even inallowmode, because the command text comes from the model. With the defaultoff, no tools are offered and no process is started. The blocklist is a convenience guardrail, not a security boundary. - Conversation storage: the transcript lives in the service's memory, is limited
to the newest 200 messages, and is discarded when the service stops or the
plugin reloads. Only credentials, the selected model and the installation id
are written to
state.json. - Streaming replies that end abruptly are kept and marked as stopped. While a reply streams it is shown as plain text; the completed message renders markdown and the code-copy buttons. The panel renders only the newest messages at first to stay within the plugin callback budget; older ones are loaded on demand with Show more.
License
MIT.
Versions
| Version | Plugin API | Updated |
|---|---|---|
| v0.2.6 latest | 43 | Dec 3, 2026 |
Older versions stay installable on a Noctalia release whose plugin API is below the latest version's.