fix(core): register custom api under non-reserved name for omp 17.4.0
omp 17.4.0's host registry rejects registerCustomApi calls under
built-in api names ("Cannot register custom API '<name>': built-in
API names are reserved"). The provider and its models registered
under "openai-completions", so the extension failed to load.
Register under "commandcode-custom" instead (matches the published
npm build) and restore the real wire api via apiForModelId before
dispatching to the native compat stream inside the transport router.
The host's model registry also stores provider-supplied compat under
model.compatConfig internally, only copying it back to model.compat
inside its own dispatch-time patches. Since the transport router calls
the native compat stream directly, it must read compatConfig itself or
requests crash with 'baseCompat is undefined' before any network call.
Verified against a local mock Provider API server with the extension
linked into omp 17.4.0: model discovery lists all Command Code models,
and a streamed chat completion sends the resolved x-cmd-zdr header and
Authorization header end to end. O
Omar Iqbal Naru committed
1e0dd1189cb7dbc28cd90fbe346455803a6fa0b1
Parent: 6de4626