Files
mesh-catalog/modules/local-model-consumer/module.json
jschoubben 29fe7c5bd0 local model: an ollama provider + a local-model consumer (ADR 0055)
Model access answered by a NODE, not a licence. `ollama` runs the model server
on host network (0.0.0.0:11434) and provides model-access at node scope, serving
its port and model — it mints nothing, so it is server-only, no runtime. The
`local-model-consumer` requires model-access, gets the endpoint (no secret), and
its templated openai.env carries OPENAI_BASE_URL=http://<at>:<port>/v1 +
OPENAI_MODEL. One provision, two answers: the mesh's own model behind the same
interface as a vendor's.

Proven end to end by the mesh-lab local-model bed (green).

Claude-Session: https://claude.ai/code/session_01LrgweAeERJYBg88c5cKDzF
2026-09-07 05:25:21 +02:00

33 lines
795 B
JSON

{
"module": "local-model-consumer",
"version": "1",
"slug": "local",
"requires": [
"model-access"
],
"binds": {
"model-access": "/var/lib/local-model-consumer/model.json"
},
"resources": [
{
"id": "state",
"type": "directory",
"path": "/var/lib/local-model-consumer",
"mode": "0700"
},
{
"id": "config",
"type": "directory",
"path": "/var/lib/local-model-consumer/config",
"mode": "0700"
},
{
"id": "openai-env",
"type": "file",
"path": "/var/lib/local-model-consumer/config/openai.env",
"mode": "0600",
"content": "OPENAI_BASE_URL=http://${bound:model-access:at}:${bound:model-access:port}/v1\nOPENAI_MODEL=${bound:model-access:model}\nOPENAI_API_KEY=local\n"
}
]
}