fix(go-models): add VolcEngine model listing suffix (#15234)

## Summary
- add the VolcEngine `models` URL suffix used by the existing Go
`ListModels` implementation
- return a clear error when the VolcEngine models suffix is missing
- add focused VolcEngine model-listing regression tests

## What changed
- Added `url_suffix.models` to `conf/models/volcengine.json`.
- Normalized the configured models suffix before building the request
URL.
- Covered config loading, successful model listing, upstream errors, and
missing suffix handling.

## Why
`VolcEngine.ListModels` already builds requests from `URLSuffix.Models`,
but the bundled VolcEngine config did not define that suffix. That left
the model-listing path unable to call the documented `/models` endpoint
from the existing provider config.

Fixes #14701

Co-authored-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
oktofeesh
2026-05-26 22:14:56 -07:00
committed by GitHub
parent 1f34a18242
commit a3c6e075f6
3 changed files with 118 additions and 3 deletions

View File

@@ -6,7 +6,8 @@
"url_suffix": {
"chat": "chat/completions",
"files": "files",
"embedding": "embeddings/multimodal"
"embedding": "embeddings/multimodal",
"models": "models"
},
"class": "volcengine",
"models": [
@@ -29,4 +30,4 @@
]
}
]
}
}