Repository navigation
Langflow: OpenAI API Base, typed model names, and the server-key endpoint guard #15848
apigoto
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I work on the APIGOTO team. APIGOTO is an independent OpenAI-compatible gateway, not affiliated with OpenAI, Anthropic or Google. This applies to any OpenAI-compatible endpoint.
1. Confirm the endpoint and key
curl https://api.china-aiapi.com/v1/models -H "Authorization: Bearer $KEY"2. OpenAI component (OpenAI bundle)
https://api.china-aiapi.com/v1. Stop at/v1; the SDK adds/chat/completions.MODEL_IDeven if it isn't listed.Two things from the component source:
OPENAI_API_BASE/OPENAI_BASE_URL. An empty field meanshttps://api.openai.com/v1, so fill it on every component.OPENAI_API_KEY), Langflow won't send it to a non-default host. You'll see "Refusing to send a server-provisioned API credential to the non-default endpoint…". Fix: give the component an explicit key, or have the operator add the host toLANGFLOW_PROVIDER_CREDENTIAL_ALLOWED_HOSTS. A custom endpoint also has to be https unless allowlisted.3. Alternative on 1.12: OpenAI Compatible provider
Profile icon → Settings → Model Providers → OpenAI Compatible. Enter Base URL and API Key (or set
OPENAI_COMPATIBLE_BASE_URL/OPENAI_COMPATIBLE_API_KEY), then Save. Models are discovered from/v1/models; enable them and pick one in any Language Model or Agent component.Troubleshooting
/v1missing, or doubled by pasting a full endpoint./modelsdoesn't return it. Use the OpenAI component and type the ID.MODEL_IDbefore debugging the flow.response_format.We use one key for several model families, with upstream failover (at most 3 retries) and a per-request log. Pay-as-you-go, BYOK supported: www.china-aiapi.com
For shared deployments, do you prefer the provider or per-component base URLs?
All reactions