When a custom OpenAI-compatible provider uses a prefix that matches
a built-in alias (e.g. 'ark' -> 'volcengine-ark'), resolveProviderAlias()
converts it to the built-in provider ID, causing the provider-node
matching logic to be skipped. The request is then routed to the wrong
provider, resulting in a 404 model_not_found error.
Fix: always check provider-node prefix matching using the original
user input (parsed.providerAlias) before falling back to the resolved
alias, regardless of whether resolveProviderAlias() transformed it.
Co-authored-by: H1d3rOne <H1d3rOne@users.noreply.github.com>
Made-with: Cursor