mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 04:12:10 +03:00
feat(gitlawb): serve models from static registry without API-unavailable warning
GitLawB's OpenGateway API does not expose a /models endpoint per provider-path. Previously the models route fell through to the generic fallback which returned static catalog models with the misleading 'API unavailable — using local catalog' warning. Now gitlawb and gitlawb-gmi are handled as static model providers (same pattern as reka and qwen OAuth) — models are served from the provider registry without any warning, since all registered models are functional via POST /chat/completions.
This commit is contained in:
@@ -1939,6 +1939,23 @@ export async function GET(
|
||||
});
|
||||
}
|
||||
|
||||
// GitLawB: OpenGateway API does not expose /models endpoint per provider-path.
|
||||
// All models are registered statically in the provider registry and work via
|
||||
// POST /chat/completions — return them from local catalog without a warning.
|
||||
if (provider === "gitlawb" || provider === "gitlawb-gmi") {
|
||||
const gitlawbModels = getModelsByProviderId(provider);
|
||||
return buildResponse({
|
||||
provider,
|
||||
connectionId,
|
||||
models: gitlawbModels.map((m: any) => ({
|
||||
id: m.id,
|
||||
name: m.name || m.id,
|
||||
owned_by: provider,
|
||||
})),
|
||||
source: "local_catalog",
|
||||
});
|
||||
}
|
||||
|
||||
const localCatalog = mergeLocalCatalogModels(registryCatalogModels, specialtyCatalogModels);
|
||||
if (!config && localCatalog.length > 0) {
|
||||
return buildResponse({
|
||||
|
||||
Reference in New Issue
Block a user