Commit Graph
33 Commits
Author SHA1 Message Date
Kai (Tam Nhu) TranandGitHub a840793a9b fix(proxy): avoid exposing local auth token in daemon argv (#1230) 2026-05-12 18:13:20 -04:00
Tam Nhu Tran dc8bbd85e7 fix: route OpenRouter profiles through v1 API 2026-05-05 11:44:58 -04:00
Tam Nhu Tran 4f6e61739c refactor(config): adopt config-loader-facade across the codebase
Issue #1161. Sweeps 127 files to import from
src/config/config-loader-facade.ts instead of unified-config-loader or
utils/config-manager directly.

WRITE callers (32 files): replaced raw saveUnifiedConfig /
mutateUnifiedConfig / updateUnifiedConfig calls with the facade's
cache-coherent wrappers saveConfig / mutateConfig / updateConfig. This
fixes a latent stale-cache window where direct writes through the
underlying loader bypassed the facade's memoization.

READ callers (95 files): mechanical import-path migration only —
function names unchanged because the facade re-exports them. No
behavior change.

Also updated:
- tests/unit/utils/browser/browser-setup.test.ts (DI interface rename)
- src/management/checks/image-analysis-check.ts (dynamic import rename)
- src/web-server/health-service.ts (dynamic require rename)
- src/ccs.ts (path prefix fix from sweep script)

After sweep: zero raw write callers remain outside src/config/. Direct
imports of config-manager remain only for symbols not in the facade
(getConfigPath, getCcsDirSource, etc). Behavior unchanged; full suite
passes 1824/1824.

Out of scope: switching loadOrCreateUnifiedConfig() callers to
getCachedConfig() — needs per-callsite cache-safety analysis. Tracked
as follow-up.

Refs #1161
2026-05-03 01:42:53 -04:00
Tam Nhu Tran 4700727915 feat(proxy,cli): emit lifecycle stages with x-ccs-request-id propagation
Wrap proxy server entry edge in withRequestContext so every inbound request
gets a requestId (reused from x-ccs-request-id header when valid UUID-ish,
freshly minted otherwise). messages-route emits 7 stages: intake / auth /
transform / route / dispatch / upstream / respond, each with latencyMs and
structured error metadata on failure.

CCS CLI entry (ccs.ts) wraps main() in runWithRequestId and emits
cli.command.start / complete / failed stages so command lifecycle is
correlatable end-to-end.

Refs #1141, #1138
2026-04-30 13:00:00 -04:00
Tam Nhu Tran d9ace607e5 fix(proxy): shape direct OpenAI reasoning chat payloads 2026-04-30 12:33:02 -04:00
seilk 83c16e216a fix(proxy): avoid leaking tool_result image URLs 2026-04-30 02:18:22 +09:00
seilk f6bb31c956 fix(proxy): stringify tool_result images for OpenAI upstreams 2026-04-30 00:55:45 +09:00
Chris Weller 1c91c46326 fix(proxy): avoid settings override and nested reasoning for openai-compat 2026-04-26 14:53:25 -06:00
Tam Nhu Tran d5591913ef fix(proxy): clarify shared port fallback and legacy 3456 handling 2026-04-23 15:00:50 -04:00
Tam Nhu Tran 15751e2db5 feat(proxy): add adaptive local port selection for OpenAI-compatible profiles 2026-04-23 14:47:01 -04:00
Tam Nhu Tran 71deda553a fix(cliproxy): preserve adaptive thinking on opus 4.7 paths 2026-04-22 21:43:11 -04:00
Tam Nhu Tran 399f403322 fix(transformers): preserve tool ordering across proxy streams
- reject pending tool_result layouts that cannot be translated without reordering user content

- keep interleaved GLMT tool_use blocks open until finalization instead of stopping early

- cover leading/interleaved tool_result regressions and interleaved streaming tool fragments
2026-04-20 13:17:30 -04:00
Grandis SYFandTam Nhu Tran a0f91761ed feat(glmt): fix sequential tool_use block handling 2026-04-20 13:06:00 -04:00
Grandis SYFandTam Nhu Tran baa58c9543 feat(proxy): add HEAD method support for health probe endpoints 2026-04-20 13:06:00 -04:00
Tam Nhu Tran 1cfed73ca5 fix(proxy): harden stale daemon ownership checks 2026-04-20 12:44:30 -04:00
Wooseong Kim afcb1abf9e fix(proxy): retain explicit profile names in status 2026-04-20 15:30:51 +09:00
Wooseong Kim 391bdddc22 fix(proxy): handle legacy stop and preferred ports 2026-04-20 15:25:16 +09:00
Wooseong Kim c0c119867a fix(proxy): persist daemon state after startup 2026-04-20 15:04:24 +09:00
Wooseong Kim 8ad2763942 fix(proxy): retry candidate ports on bind conflict 2026-04-20 14:59:59 +09:00
Wooseong Kim db32d15d86 fix(proxy): preserve running daemons on restart failure 2026-04-20 14:51:32 +09:00
Wooseong Kim 7cf555356a fix(proxy): retry raced dynamic port binds 2026-04-20 14:33:44 +09:00
Wooseong Kim f345cf441e fix(proxy): ignore legacy singleton session file 2026-04-20 14:09:50 +09:00
Wooseong Kim 24c24847f7 fix(proxy): preserve legacy state and exact ports 2026-04-20 14:03:12 +09:00
Wooseong Kim 630a493cca fix(proxy): disambiguate activate without profile 2026-04-20 13:28:25 +09:00
Wooseong Kim 94bf1fbfe9 feat(proxy): support profile-scoped local proxy ports 2026-04-20 13:14:19 +09:00
Tam Nhu Tran ebc92194bb fix(proxy): harden Anthropic request transformation semantics
- enforce strict tool_result ordering and pairing against assistant tool_use ids
- reject tool_result image payloads that cannot map to OpenAI tool messages
- preserve raw tool schemas on the /v1/messages proxy path instead of silently tightening them
- forward Anthropic tool_choice semantics and cover adaptive routing plus upstream payload checks
2026-04-18 19:39:13 -04:00
Tam Nhu Tran 32d6bfdda7 fix(proxy): restore strict Anthropic message validation 2026-04-18 19:02:38 -04:00
Grandis SYF 2672e35362 feat(proxy): enhance Anthropic-to-OpenAI message transformation and schema sanitization 2026-04-18 13:49:20 +07:00
Tam Nhu Tran 841eeb497c fix(proxy): keep stream guards active through sse piping 2026-04-15 02:52:29 -04:00
Tam Nhu Tran a3407093d7 refactor(proxy): internalize sse translation and cleanup handlers 2026-04-15 01:44:01 -04:00
Tam Nhu Tran 17187c4abd feat(proxy): complete openai routing scope 2026-04-15 00:55:11 -04:00
Tam Nhu Tran a6aa576d5a fix(proxy): detect dashscope compatible-mode profiles 2026-04-14 23:49:34 -04:00
Tam Nhu Tran 074e900557 feat(proxy): add openai-compatible local proxy runtime 2026-04-14 19:26:59 -04:00