File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
openviking/models/vlm/backends Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,8 @@ Volcengine supports both model names and endpoint IDs. Using model names is reco
121121 "vlm" : {
122122 "provider" : " volcengine" ,
123123 "model" : " doubao-seed-1-6-240615" ,
124- "api_key" : " your-api-key"
124+ "api_key" : " your-api-key" ,
125+ "api_base" : " https://ark.cn-beijing.volces.com/api/v3" ,
125126 }
126127}
127128```
@@ -133,7 +134,8 @@ You can also use endpoint IDs (found in [Volcengine ARK Console](https://console
133134 "vlm" : {
134135 "provider" : " volcengine" ,
135136 "model" : " ep-20241220174930-xxxxx" ,
136- "api_key" : " your-api-key"
137+ "api_key" : " your-api-key" ,
138+ "api_base" : " https://ark.cn-beijing.volces.com/api/v3" ,
137139 }
138140}
139141```
Original file line number Diff line number Diff line change @@ -72,6 +72,13 @@ def _resolve_model(self, model: str) -> str:
7272 model = f"{ prefix } /{ model } "
7373 return model
7474
75+ if self ._provider_name == "openai" and self .api_base :
76+ from openviking .models .vlm .registry import find_by_name
77+ openai_spec = find_by_name ("openai" )
78+ is_openai_official = "api.openai.com" in self .api_base
79+ if openai_spec and not is_openai_official and not model .startswith ("openai/" ):
80+ return f"openai/{ model } "
81+
7582 spec = find_by_model (model )
7683 if spec and spec .litellm_prefix :
7784 if not any (model .startswith (s ) for s in spec .skip_prefixes ):
You can’t perform that action at this time.
0 commit comments