Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ Volcengine supports both model names and endpoint IDs. Using model names is reco
"vlm": {
"provider": "volcengine",
"model": "doubao-seed-1-6-240615",
"api_key": "your-api-key"
"api_key": "your-api-key",
"api_base" : "https://ark.cn-beijing.volces.com/api/v3",
}
}
```
Expand All @@ -133,7 +134,8 @@ You can also use endpoint IDs (found in [Volcengine ARK Console](https://console
"vlm": {
"provider": "volcengine",
"model": "ep-20241220174930-xxxxx",
"api_key": "your-api-key"
"api_key": "your-api-key",
"api_base" : "https://ark.cn-beijing.volces.com/api/v3",
}
}
```
Expand Down
7 changes: 7 additions & 0 deletions openviking/models/vlm/backends/litellm_vlm.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ def _resolve_model(self, model: str) -> str:
model = f"{prefix}/{model}"
return model

if self._provider_name == "openai" and self.api_base:
from openviking.models.vlm.registry import find_by_name
openai_spec = find_by_name("openai")
is_openai_official = "api.openai.com" in self.api_base
if openai_spec and not is_openai_official and not model.startswith("openai/"):
return f"openai/{model}"

spec = find_by_model(model)
if spec and spec.litellm_prefix:
if not any(model.startswith(s) for s in spec.skip_prefixes):
Expand Down
Loading