Skip to content

Fix/ci mock llm#206

Merged
Colin4k1024 merged 3 commits into
mainfrom
fix/ci-mock-llm
May 27, 2026
Merged

Fix/ci mock llm#206
Colin4k1024 merged 3 commits into
mainfrom
fix/ci-mock-llm

Conversation

@Colin4k1024
Copy link
Copy Markdown
Owner

Summary

Describe the change and why it is needed.

Changes

Validation

  • go test ./...
  • go build ./...
  • docs updated when behavior changed

Compatibility / Risk

Call out breaking changes, migrations, or runtime risks.

Related Issues

Link related issues (e.g. Closes #123).

Hermes Agent added 2 commits May 27, 2026 21:09
GitHub Actions Linux runners cannot reach host.docker.internal:11434
(Ollama). The conversation agent's chatModel.Generate() call hangs
indefinitely, causing all 6 perf-gate jobs to timeout with
completion_ratio=0.00, failing the P0 gate.

Fix:
- cmd/llm-mock/main.go: minimal Go HTTP server on :11434 that returns
  valid OpenAI-format chat completion responses instantly (no model
  required, pure stdlib, zero external deps)
- deployments/compose/Dockerfile: build llm-mock binary in builder stage
  and include it in the runtime image
- deployments/compose/docker-compose.ci.yml: CI Compose overlay that
  adds llm-mock as a service and redirects MODEL_LLM_PROVIDERS_OPENAI_BASE_URL
  from host.docker.internal:11434 to http://llm-mock:11434/v1 for
  api, worker1, and worker2
- scripts/local-2.0-stack.sh: auto-detect CI=true (set by GitHub Actions)
  and activate the CI overlay; extend health-wait from 30s to 90s in CI
  to allow time for the mock service build

No application code changes. local (non-CI) behaviour is unchanged.
Copilot AI review requested due to automatic review settings May 27, 2026 13:11
@Colin4k1024 Colin4k1024 added the ready-to-merge Queued and ready for serial merge label May 27, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the local/CI docker-compose stack so CI runs can use an in-network mock OpenAI-compatible LLM service (instead of host.docker.internal), enabling perf/drill gates to run on Linux runners without requiring Ollama/OpenAI access.

Changes:

  • Add a new cmd/llm-mock binary implementing minimal /v1/chat/completions, /v1/models, and /health endpoints.
  • Add a docker-compose.ci.yml override that introduces llm-mock and rewires API/workers to use it in CI.
  • Update the local stack script and compose Dockerfile to support the CI overlay and include the llm-mock binary.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
scripts/local-2.0-stack.sh Auto-detect CI and overlay docker-compose.ci.yml; make health wait configurable/longer in CI.
deployments/compose/Dockerfile Build and ship the new llm-mock binary into the compose image.
deployments/compose/docker-compose.ci.yml Add llm-mock service and override API/worker OpenAI base URL to point at it.
cmd/llm-mock/main.go Implement the CI mock LLM HTTP server endpoints.

Comment thread scripts/local-2.0-stack.sh Outdated
Comment thread cmd/llm-mock/main.go
Comment thread scripts/local-2.0-stack.sh
@Colin4k1024 Colin4k1024 merged commit 83c5941 into main May 27, 2026
6 checks passed
@Colin4k1024 Colin4k1024 deleted the fix/ci-mock-llm branch May 27, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Queued and ready for serial merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants