Problem
The inference-parser plugin dispatches on the request path in OnRequest with:
case "/v1/chat/completions", "/v1/completions":
OpenAI-compatible proxies such as litellm (used by opencode) strip the /v1 prefix and post to /chat/completions directly. This falls through to the default arm, so pctx.Extensions.Inference is never populated — resulting in missing model, token counts, and method fields in abctl session views.
Observed in abctl output when running opencode through authbridge-proxy in demo mode:
9 14:13:56.91 out │┌ req — — ete-litellm.ai-mode…
9 14:13:59.27 out │└ resp — — 200 2.36s ete-litellm.ai-mode…
Compare with Claude Code (which posts to /v1/messages — matched by the Anthropic path), where all fields are populated correctly.
Root cause
authbridge/authlib/plugins/inferenceparser/plugin.go — the OnRequest switch only covers /v1/chat/completions and /v1/completions. The /v1-less variants /chat/completions and /completions are not listed.
The response path (OnResponseFrame) is unaffected — its default branch already routes to the OpenAI parsers, so response parsing works once the request side is fixed.
Fix
Extend the OnRequest switch case to include the /v1-less variants:
// Before
case "/v1/chat/completions", "/v1/completions":
// After
case "/v1/chat/completions", "/v1/completions", "/chat/completions", "/completions":
No other changes needed.
Problem
The
inference-parserplugin dispatches on the request path inOnRequestwith:OpenAI-compatible proxies such as litellm (used by opencode) strip the
/v1prefix and post to/chat/completionsdirectly. This falls through to thedefaultarm, sopctx.Extensions.Inferenceis never populated — resulting in missing model, token counts, and method fields inabctlsession views.Observed in
abctloutput when running opencode through authbridge-proxy in demo mode:Compare with Claude Code (which posts to
/v1/messages— matched by the Anthropic path), where all fields are populated correctly.Root cause
authbridge/authlib/plugins/inferenceparser/plugin.go— theOnRequestswitch only covers/v1/chat/completionsand/v1/completions. The/v1-less variants/chat/completionsand/completionsare not listed.The response path (
OnResponseFrame) is unaffected — itsdefaultbranch already routes to the OpenAI parsers, so response parsing works once the request side is fixed.Fix
Extend the
OnRequestswitch case to include the/v1-less variants:No other changes needed.