Repository navigation
Dify's OpenAI-API-compatible plugin, field by field, for any /v1 endpoint #44286
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. The plugin form is the same for any OpenAI-compatible endpoint.
Check the endpoint first
curl https://api.china-aiapi.com/v1/models -H "Authorization: Bearer $KEY"Note the exact model IDs it returns.
Add an LLM
MODEL_ID, exactly as/modelsreturned it. It's sent asmodel; Model display name is just the Dify label. Leave model name for API endpoint empty unless you need to send a different ID.https://api.china-aiapi.com/v1. The plugin appends/chat/completions, so don't add it.Repeat 2–8 for each model ID.
Troubleshooting
/v1must appear exactly once; a missing/v1or a pasted/chat/completionsboth break it./v1to avoid/v1/v1./models(case and suffix count). The display name is never sent.max_tokensormax_completion_tokensinstead of Auto.We use one key for several model families, with upstream failover (at most 3 retries) and a per-request log to see what a workflow sent. Pay-as-you-go, BYOK supported: www.china-aiapi.com
If you run several model families in one workflow, do you keep one provider entry per family or one per use case?
All reactions