Repository navigation
Conversation
…1403) * fix(cloud-code): scope thinking stripping to executor boundaries (cheaper-inference#1401) * fix(cloud-code): scope thinking stripping to executors * fix(cloud-code): guard antigravity normalized body * Update Claude Code obfuscation to version 2.1.114 - Update Claude Code version from 2.1.87 to 2.1.114 - Update X-Stainless-Package-Version from 0.80.0 to 0.81.0 - Add new beta flags: redact-thinking-2026-02-12, advisor-tool-2026-03-01, advanced-tool-use-2025-11-20 - Add missing headers: anthropic-version, anthropic-dangerous-direct-browser-access, x-app, X-Stainless-Timeout - Add all X-Stainless-* headers (Arch, Lang, OS, Runtime, Runtime-Version, Retry-Count) - Fix accept-encoding header: identity -> gzip, deflate, br, zstd - Add connection: keep-alive header - Update tool name mapping: add lsp, apply_patch, websearch These changes ensure that requests from OpenCode through Omniroute are indistinguishable from genuine Claude Code 2.1.114 requests, allowing proper authentication with Anthropic's API without triggering extra credits errors. * fix: resolve CodeQL password hash alert and TruffleHog CI failure --------- Co-authored-by: Randi <55005611+rdself@users.noreply.github.com> Co-authored-by: Diego Rodrigues de Sa e Souza <8016841+diegosouzapw@users.noreply.github.com> Co-authored-by: Nikolay Popov <ekklesio.dev@gmail.com> Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com>
There was a problem hiding this comment.
Code Review
This pull request introduces comprehensive support for Claude Code emulation by implementing header patching, tool remapping, and billing header injection within the base executor. It also centralizes the logic for stripping reasoning and thinking configurations for unsupported models at the executor boundaries. Additional updates include refined release and PR review workflows, security adjustments to file checksum algorithms, and extensive unit test enhancements to address TypeScript strictness. Review feedback highlights a security risk involving a hardcoded device ID, a duplicate section header in the release documentation, and redundant object keys within the test suite.
| if (!tb.metadata || typeof tb.metadata !== "object") { | ||
| tb.metadata = { | ||
| user_id: JSON.stringify({ | ||
| device_id: createHash("sha256").update("omniroute").digest("hex").slice(0, 24), |
There was a problem hiding this comment.
The device_id is hardcoded as a static hash of the string "omniroute". This means every installation of OmniRoute will present the same device ID to Anthropic, which significantly increases the risk of account flagging or detection as a proxy. Consider generating a unique, persistent ID per installation or using a random UUID to improve anonymity.
| device_id: createHash("sha256").update("omniroute").digest("hex").slice(0, 24), | |
| device_id: createHash("sha256").update(randomUUID()).digest("hex").slice(0, 24), |
|
|
||
| ### 9. Open PR to main | ||
|
|
||
| ### 9. Open PR to main |
| isModelAvailable: async () => true, | ||
| log: createLog(), | ||
| settings: null, | ||
| relayOptions: null as any, |
There was a problem hiding this comment.
Summary
Related Issues
Validation
Simply changes(add 1 string to array)
Tests Added Or Updated
Coverage Notes
src/,open-sse/,electron/, orbin/, explain which tests cover the change.Reviewer Notes