From 3456de45863969f5de572494c37b8a8379833172 Mon Sep 17 00:00:00 2001 From: Sun-ZhenXing <1006925066@qq.com> Date: Fri, 8 May 2026 11:48:15 +0800 Subject: [PATCH] feat: update GoModel --- README.md | 2 +- README.zh.md | 2 +- src/gomodel/.env.example | 6 +++--- src/gomodel/README.md | 4 ++-- src/gomodel/README.zh.md | 4 ++-- src/gomodel/docker-compose.yaml | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 61f984b..017e0c4 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ These services require building custom Docker images from source. | [Gitea](./src/gitea) | 1.25.4-rootless | | [GitLab Runner](./src/gitlab-runner) | 17.10.1 | | [GitLab](./src/gitlab) | 18.8.3-ce.0 | -| [GoModel](./src/gomodel) | v0.1.25 | +| [GoModel](./src/gomodel) | v0.1.27 | | [GPUStack](./src/gpustack) | v0.5.3 | | [Grafana](./src/grafana) | 12.3.2 | | [Grafana Loki](./src/loki) | 3.3.2 | diff --git a/README.zh.md b/README.zh.md index 9dd1b10..fbaeac8 100644 --- a/README.zh.md +++ b/README.zh.md @@ -88,7 +88,7 @@ docker compose exec redis redis-cli ping | [Gitea](./src/gitea) | 1.25.4-rootless | | [GitLab Runner](./src/gitlab-runner) | 17.10.1 | | [GitLab](./src/gitlab) | 18.8.3-ce.0 | -| [GoModel](./src/gomodel) | v0.1.25 | +| [GoModel](./src/gomodel) | v0.1.27 | | [GPUStack](./src/gpustack) | v0.5.3 | | [Grafana](./src/grafana) | 12.3.2 | | [Grafana Loki](./src/loki) | 3.3.2 | diff --git a/src/gomodel/.env.example b/src/gomodel/.env.example index e18d503..0b2e324 100644 --- a/src/gomodel/.env.example +++ b/src/gomodel/.env.example @@ -1,11 +1,11 @@ # GoModel Configuration # ===================== # Copy this file to .env and fill in the values you need. -# All entries are optional — GoModel starts without any provider key -# configured, but will serve no models until at least one is set. +# At least one provider key or base URL must be set — GoModel exits +# immediately on startup if no providers can be registered. # ---- Image version ---- -GOMODEL_VERSION=0.1.25 +GOMODEL_VERSION=0.1.27 # ---- Network ---- # Host port that maps to the container's port 8080 diff --git a/src/gomodel/README.md b/src/gomodel/README.md index 9f75569..3bd3c1c 100644 --- a/src/gomodel/README.md +++ b/src/gomodel/README.md @@ -14,7 +14,7 @@ docker compose up -d ``` -The gateway is available at `http://localhost:8080`. By default it starts in open (unauthenticated) mode with SQLite storage and no provider keys configured. +The gateway is available at `http://localhost:8080`. **At least one provider credential is required** for GoModel to start — the gateway will exit immediately if no provider is configured. It runs in open (unauthenticated) mode with SQLite storage by default. To route real traffic, create a `.env` file from the example and add at least one provider credential: @@ -46,7 +46,7 @@ List available models: `http://localhost:8080/v1/models` | Variable | Default | Description | | ------------------------- | --------- | ------------------------------------------------------------------ | -| `GOMODEL_VERSION` | `0.1.25` | Docker image version | +| `GOMODEL_VERSION` | `0.1.27` | Docker image version | | `GOMODEL_PORT_OVERRIDE` | `8080` | Host port for the API | | `GOMODEL_MASTER_KEY` | _(empty)_ | API authentication key — **set this for any non-local deployment** | | `GOMODEL_STORAGE_TYPE` | `sqlite` | Storage backend: `sqlite`, `postgresql`, or `mongodb` | diff --git a/src/gomodel/README.zh.md b/src/gomodel/README.zh.md index 931d3e1..b0d6ed4 100644 --- a/src/gomodel/README.zh.md +++ b/src/gomodel/README.zh.md @@ -14,7 +14,7 @@ docker compose up -d ``` -服务启动后可通过 `http://localhost:8080` 访问。默认以开放(无鉴权)模式运行,使用 SQLite 存储,且未配置任何提供商密钥。 +服务启动后可通过 `http://localhost:8080` 访问。**GoModel 启动必须配置至少一个 Provider 凭据**,若未配置任何提供商,服务将在启动时直接退出。默认以开放(无鉴权)模式运行,使用 SQLite 存储。 接入真实流量,请先从示例文件创建 `.env` 并填入至少一个提供商凭据: @@ -46,7 +46,7 @@ curl http://localhost:8080/v1/chat/completions \ | 变量 | 默认值 | 说明 | | ------------------------- | -------- | ------------------------------------------------ | -| `GOMODEL_VERSION` | `0.1.25` | Docker 镜像版本 | +| `GOMODEL_VERSION` | `0.1.27` | Docker 镜像版本 | | `GOMODEL_PORT_OVERRIDE` | `8080` | API 宿主机端口 | | `GOMODEL_MASTER_KEY` | _(空)_ | API 鉴权密钥——**向本机以外的网络暴露时必须设置** | | `GOMODEL_STORAGE_TYPE` | `sqlite` | 存储后端:`sqlite`、`postgresql` 或 `mongodb` | diff --git a/src/gomodel/docker-compose.yaml b/src/gomodel/docker-compose.yaml index 08f4aa3..611b578 100644 --- a/src/gomodel/docker-compose.yaml +++ b/src/gomodel/docker-compose.yaml @@ -9,7 +9,7 @@ x-defaults: &defaults services: gomodel: <<: *defaults - image: ${GLOBAL_REGISTRY:-}enterpilot/gomodel:${GOMODEL_VERSION:-0.1.25} + image: ${GLOBAL_REGISTRY:-}enterpilot/gomodel:${GOMODEL_VERSION:-0.1.27} ports: - '${GOMODEL_PORT_OVERRIDE:-8080}:8080' volumes: