Skip to content

v0.16.0 — configure the Hub's AI for web clients

Latest

Choose a tag to compare

@gmpassos gmpassos released this 15 Jul 04:41
adb9f61

Configure the Hub's AI once, and every browser gets :ai — no key in the client.

omnyserver ai config --provider anthropic --key -   # prompts, writes ~/.omnyserver/ai.yaml
omnyserver hub start --shell …                      # proxies :ai for web clients

Why

The dashboard's in-terminal :ai and :ide proxy their provider calls through the Hub so no browser holds an API key — but omnyserver's shell broker served no AI: it built the OmnyShell broker without an aiProxy, so a web client's fetchHubAiConfig always answered "unavailable".

Added

  • omnyserver ai config | show | test — configure the AI provider the Hub proxies. config writes provider/model/key/mode/language to <OMNYSERVER_HOME>/ai.yaml (mode 600; --key - reads from a hidden prompt); show prints it with the key masked; test validates the key + models with a live provider request. Keys may also come from ANTHROPIC_API_KEY / OPENAI_API_KEY / GEMINI_API_KEY.
  • hub start --ai-config (default <OMNYSERVER_HOME>/ai.yaml) — loaded and threaded into the shell broker under --shell. The browser learns the provider/model and forwards requests for the Hub to sign; the key never leaves the Hub. Startup reports whether AI is configured.

Reuse

AiConfig, AiConfigIo, HttpProxyService, providerFor, validateModels are public in the omnyshell package omnyserver already depends on — this is CLI glue plus one broker wiring. Adds http (for ai test).

Full notes: CHANGELOG.md