Add OpenAI-compatible LLM client service (v0.19.0) #40

Merged
kamilkrzywda merged 1 commits from feat/llm-client into main 2026-09-25 20:09:32 +02:00
Owner

New src/llm module: LlmService wrapping the local OpenAI-compatible server (default http://192.168.1.70:1111/v1, model qwen3.8-27b).

  • listModels() — GET /models → model ids
  • chat(messages, { maxTokens?, temperature? }) — POST /chat/completions → content string; throws on non-2xx (status + body snippet) and on malformed 2xx replies
  • summarize(text) — thin chat() wrapper with a fixed system prompt (stated primary use)

Env: LLM_API_BASE, LLM_MODEL, LLM_TIMEOUT_MS (default 60 s, via AbortSignal.timeout). Native fetch only — no new dependencies. No auth support (server needs none).

Tests 124 → 128 (+4 specs), build + oxlint clean. Changelog v0.19.0 entry; package.json bumped; lockfile untouched.

New `src/llm` module: `LlmService` wrapping the local OpenAI-compatible server (default `http://192.168.1.70:1111/v1`, model `qwen3.8-27b`). - `listModels()` — GET /models → model ids - `chat(messages, { maxTokens?, temperature? })` — POST /chat/completions → content string; throws on non-2xx (status + body snippet) and on malformed 2xx replies - `summarize(text)` — thin chat() wrapper with a fixed system prompt (stated primary use) Env: `LLM_API_BASE`, `LLM_MODEL`, `LLM_TIMEOUT_MS` (default 60 s, via AbortSignal.timeout). Native fetch only — no new dependencies. No auth support (server needs none). Tests 124 → 128 (+4 specs), build + oxlint clean. Changelog v0.19.0 entry; package.json bumped; lockfile untouched.
kamilkrzywda added 1 commit 2026-09-25 20:09:26 +02:00
Add OpenAI-compatible LLM client service (v0.19.0)
CI / build + unit (pull_request) Successful in 1m14s
c5a2815c01
LlmService wraps the local OpenAI-compatible server (default
http://192.168.1.70:1111/v1, no auth) with native fetch only — no new
dependencies. listModels() -> data[].id; chat(messages, opts?) ->
choices[0].message.content (non-2xx throws with status + body snippet);
summarize(text) = chat() with a concise-summary system prompt.

Env: LLM_API_BASE / LLM_MODEL (qwen3.8-27b) / LLM_TIMEOUT_MS (60000,
AbortSignal.timeout). Plain feature module wired into app.module.ts;
docs synced (AGENTS.md, README env list).
kamilkrzywda merged commit 023cd3eef3 into main 2026-09-25 20:09:32 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: OpenCode/MeshBot#40