fb13457f6f
CI / Supply-chain scan (push) Has been cancelled
Docker Build, Test, and Publish / Detect affected areas (push) Has been cancelled
auto-fix lint issues & formatting / Generate eslint --fix patch (push) Has been cancelled
Nix flake check / Detect affected areas (push) Has been cancelled
Deploy Site / deploy-vercel (push) Has been cancelled
Deploy Site / deploy-docs (push) Has been cancelled
CI / Detect affected areas (push) Has been cancelled
Docker Build, Test, and Publish / build (amd64, type=gha,scope=docker-amd64, type=gha,mode=max,scope=docker-amd64, linux/amd64, ubuntu-latest-32-core) (push) Has been cancelled
CI / Desktop E2E (push) Has been cancelled
CI / Docs Site (push) Has been cancelled
CI / Deny unrelated histories (push) Has been cancelled
CI / Check contributors (push) Has been cancelled
Docker Build, Test, and Publish / build (arm64, type=gha,scope=docker-arm64, type=gha,mode=max,scope=docker-arm64, linux/arm64, ubuntu-latest-32-arm-core) (push) Has been cancelled
CI / Check uv.lock (push) Has been cancelled
CI / Check no committed infographics (push) Has been cancelled
CI / Profile artifact check (push) Has been cancelled
Docker Build, Test, and Publish / publish (amd64, type=gha,scope=docker-amd64, type=gha,mode=max,scope=docker-amd64, linux/amd64, ubuntu-latest-32-core) (push) Has been cancelled
Docker Build, Test, and Publish / publish (arm64, type=gha,scope=docker-arm64, type=gha,mode=max,scope=docker-arm64, linux/arm64, ubuntu-latest-32-arm-core) (push) Has been cancelled
Docker Build, Test, and Publish / merge (push) Has been cancelled
auto-fix lint issues & formatting / Apply patch (push) Has been cancelled
CI / Check no case-colliding filenames (push) Has been cancelled
CI / package-lock.json diff (push) Has been cancelled
CI / Lint Docker scripts (push) Has been cancelled
CI / Review label gate (push) Has been cancelled
CI / All required checks pass (push) Has been cancelled
CI / CI timing report (push) Has been cancelled
CI / Python tests (push) Has been cancelled
CI / OS-specific tests (push) Has been cancelled
CI / Python lints (push) Has been cancelled
CI / JS & TS checks (push) Has been cancelled
CI / Installer tests (push) Has been cancelled
CI / Rust tests (push) Has been cancelled
Nix flake check / nix flake check (push) Has been cancelled
22 lines
946 B
Python
22 lines
946 B
Python
"""FreeModel2API (sub2api) provider profile: OpenAI-compatible self-hosted gateway.
|
|
|
|
Credentials live in this provider's own env slots — ``FREEMODEL2API_API_KEY`` and
|
|
``FREEMODEL2API_BASE_URL`` — never in a ``providers:`` / ``custom_providers:`` entry.
|
|
The endpoint is per-install, so there is no default base URL to ship; the model
|
|
catalog is whatever the saved key may use, read live from ``{base_url}/models``.
|
|
"""
|
|
|
|
from providers import register_provider
|
|
from providers.base import ProviderProfile
|
|
|
|
freemodel2api = ProviderProfile(
|
|
name="freemodel2api", aliases=("sub2api", "free-model-2-api"),
|
|
display_name="FreeModel2API",
|
|
description="FreeModel2API - self-hosted sub2api gateway (key-scoped model catalog)",
|
|
env_vars=("FREEMODEL2API_API_KEY", "FREEMODEL2API_BASE_URL"),
|
|
base_url="", # per-install; the user's base URL arrives via FREEMODEL2API_BASE_URL
|
|
auth_type="api_key",
|
|
)
|
|
|
|
register_provider(freemodel2api)
|