This is an automated email from the ASF dual-hosted git repository.
hsluoyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/casbin-gateway.git
The following commit(s) were added to refs/heads/master by this push:
new 41a1a47 feat(probe): recognize Cohere, Perplexity, Groq, Doubao and
ERNIE endpoints
41a1a47 is described below
commit 41a1a470c47347ef3d7e90fcad093d20a1eecd0b
Author: Yang Luo <[email protected]>
AuthorDate: Thu Sep 3 23:59:29 2026 +0800
feat(probe): recognize Cohere, Perplexity, Groq, Doubao and ERNIE endpoints
---
object/provider_probe_vendor.go | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/object/provider_probe_vendor.go b/object/provider_probe_vendor.go
index 7fabe6c..d370e2d 100644
--- a/object/provider_probe_vendor.go
+++ b/object/provider_probe_vendor.go
@@ -121,6 +121,41 @@ var probeVendors = []probeVendor{
hosts: []string{"api.stepfun.com", "api.stepfun.ai"},
models: []string{"step-"},
},
+ {
+ key: "cohere",
+ hosts: []string{"api.cohere.com", "api.cohere.ai"},
+ models: []string{"command", "c4ai-"},
+ },
+ {
+ key: "perplexity",
+ hosts: []string{"api.perplexity.ai"},
+ models: []string{"sonar", "r1-1776"},
+ },
+ {
+ key: "groq",
+ hosts: []string{"api.groq.com"},
+ // Groq serves open-weight models under their own names. A
prefix an
+ // earlier vendor already claims (qwen-, gemma-, deepseek-)
resolves to
+ // that vendor, so only the ones nobody else owns are listed
here.
+ models: []string{"llama-", "llama3-", "gemma2-", "allam-",
"groq/"},
+ headers: []string{
+ "X-Ratelimit-Limit-Requests",
+ "X-Ratelimit-Remaining-Requests",
+ "X-Ratelimit-Limit-Tokens",
+ "X-Ratelimit-Remaining-Tokens",
+ "X-Request-Id",
+ },
+ },
+ {
+ key: "doubao",
+ hosts: []string{"ark.cn-beijing.volces.com",
"ark.ap-southeast.volces.com"},
+ models: []string{"doubao-", "skylark"},
+ },
+ {
+ key: "ernie",
+ hosts: []string{"qianfan.baidubce.com", "aip.baidubce.com"},
+ models: []string{"ernie-"},
+ },
}
// probeVendorOfProvider is the vendor whose own endpoint this provider points
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]