Saving $100 daily on CI/CD by replacing Claude-Code with OpenRouter
Our bill went from $100 daily to less than $10 a month by moving GoodMem's CI/CD audits from Opus 5 to GLM 5.3.

GoodMem’s CI audits sometimes cost as much as $100 a day through Anthropic. Claude Code ran when changes touched selected paths, often in several sessions of five to ten minutes each.
We switched the audit of GoodMem’s clients from Opus 5 to GLM 5.3 through OpenRouter. We also moved it to a monthly schedule, with manual runs when needed. After those changes, the dedicated OpenRouter key recorded $6.26 in model charges over 30 days.

We had already used GLM 5.3 for a GoodMem red-team exercise. That OpenCode session cost $37.33 in model usage and lasted about 56 hours, including pauses, writing the report, and checking fixes. It gave us a reason to try GLM on the client audit.
We think proprietary frontier models are used by default too often. For a task with a clear scope, we prefer to start with an open-source model and supply the code and references that it needs.
What the audit checks
The audit covers the Python, Java, TypeScript, .NET, and Go clients, plus MCP. It checks whether their requests match the server’s REST/OpenAPI contract and whether changes break behavior from the published versions. A client can have the right method signature and still send a request to the wrong route.
For each REST namespace, the workflow collects the current API contract, client code, and published versions for comparison. GLM reads that material and returns its findings as JSON. A reporting job combines the reports and creates or updates one GitHub issue with the findings and any checks that could not be completed.
The ordinary client tests still run in CI. Between monthly audits, we can start an audit manually.
Limiting what the model can read and do
OpenCode runs in a temporary directory containing the files for one namespace, so the model can compare the contract, implementations, and published versions without searching the entire repository. We allow only read, glob, and grep; every other tool is denied. The model cannot run shell commands or edit the code it is reviewing.
The JSON report must say whether each client was checked against both the API contract and its published version. Each finding needs an ID, severity, affected clients, evidence, impact, and a proposed fix. The script that validates the reports rejects missing or malformed fields. If the model or a network request fails, the report marks the audit as incomplete.
Testing it
To test the workflow, we changed one line in the generated Go system client on a temporary branch:
- GET /v1/system/info
+ GET /v1/system/inf0
The last character changed from the letter o to the digit 0. The public method signature and response model stayed the same. The client would still compile, but its Info call would request a route that did not exist.
We limited the test to info and init in the system namespace across all six clients. We used a temporary push trigger and disabled issue updates for these runs.
GLM flagged the same defect in both comparisons:
| Check | Finding |
|---|---|
| REST parity | Critical: Go SystemService.Info used /v1/system/inf0 instead of the contract path /v1/system/info. |
| Backward compatibility | Critical: the current request path differed from the published Go baseline clients/v2/go/v0.1.2. |
Both findings cited clients/go/gen_api_system.go:20 and the relevant reference. The report identified the changed request path even though the method signature had stayed the same. It reported that Go’s Init call and the other five clients matched the contract and their published versions for this namespace.
The CI report
The final run generated the contract, audited the namespace, validated the JSON, uploaded the report, and combined the results.
The successful run recorded:
| Measure | Recorded value |
|---|---|
| Namespaces audited | 1 |
| REST operations checked | 2 |
| Clients checked | 6 |
| Comparisons per client | 2 |
| Planted defects detected | 1 of 1 |
| Critical findings | 2 |
| Preparation job | 6m 27s |
| Audit job, including setup | 1m 43s |
| Reporting job | 15s |
| Structured report complete | Yes |
The jobs took 8m 25s in total, excluding the gaps between them. Most of that time went to setting up the tools and generating the contract. The audit job’s 1m 43s included setup and file handling.
After the successful run, we removed the temporary trigger and restored /v1/system/info.
The case for open-source models
We think proprietary frontier models are overrated as the default for every task. On well-scoped tasks, our expectation is that open-source models with good memory orchestration can deliver comparable results at a fraction of the cost.