Subscription proxy adapters + worker correlation: record ChatGPT Pro/Codex and GLM Coding Plan token I/O #87
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/llm-log#87
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent: #94
Related: #95
Consumer: starintel-labs/starintel-biz#124 #120 #113
Goal
Make llm-log a first-class proxy/recorder for subscription-backed coding providers as well as normal API providers.
Initial subscription routes:
GLM Coding Plan
Support the official coding endpoint as a named upstream:
https://api.z.ai/api/coding/paas/v4.Preserve the OpenAI-compatible chat/completions semantics and provider-reported usage fields.
ChatGPT Plus/Pro / Codex
Support the ChatGPT subscription OAuth/Codex request path without converting the subscription credential into a Platform API-key flow.
The proxy adapter must preserve the protocol semantics expected by the Codex backend, including required account/residency/provider headers, while redacting subscription OAuth credentials from capture.
The caller (including the Biz-owned OpenCode build) must be able to send the subscription request through llm-log instead of directly to the Codex endpoint.
Internal correlation headers
Reserve an llm-log-local metadata namespace, e.g.:
Rules:
Token/usage capture
Normalize provider-reported:
Record per upstream attempt and per logical request.
For subscription traffic, token I/O is operational accounting even where the marginal dollar charge is zero.
Attempt/fallback integration
When #95 sends an exhausted subscription/direct provider request to OpenRouter:
Privacy
Acceptance