Fix/ci mock llm#206
Merged
Merged
Conversation
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.
Contributor
There was a problem hiding this comment.
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-mockbinary implementing minimal/v1/chat/completions,/v1/models, and/healthendpoints. - Add a
docker-compose.ci.ymloverride that introducesllm-mockand 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-mockbinary.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Describe the change and why it is needed.
Changes
Validation
go test ./...go build ./...Compatibility / Risk
Call out breaking changes, migrations, or runtime risks.
Related Issues
Link related issues (e.g.
Closes #123).