feat: add Tencent Cloud TokenHub provider with auto model sync
Fetch GET /v1/models on provider/key switch, activate online chat models, and accept HERMIT_/CST_ key env aliases plus tencent* provider names. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -545,6 +545,11 @@ const char *cst_models_load_error(void) {
|
||||
const cst_provider_t *cst_provider_find(const char *name) {
|
||||
if (!name || !name[0])
|
||||
return NULL;
|
||||
/* Friendly aliases for 腾讯云 TokenHub. */
|
||||
if (strcmp(name, "tencent") == 0 || strcmp(name, "tencentcloud") == 0 ||
|
||||
strcmp(name, "token-hub") == 0 || strcmp(name, "腾讯") == 0 ||
|
||||
strcmp(name, "腾讯云") == 0)
|
||||
name = "tokenhub";
|
||||
pthread_mutex_lock(&g_mu);
|
||||
ensure_locked();
|
||||
prov_t *p = prov_by_name(name);
|
||||
|
||||
Reference in New Issue
Block a user