/compatible-mode/v1).
GoModel keeps the provider ID, environment variables, and passthrough path as
bailian, BAILIAN_*, and /p/bailian/... for compatibility.max_tokens in April 2026 in favor of
max_completion_tokens, GoModel automatically maps the standard
max_tokens field to max_completion_tokens for every request — no
client change required.
Configure
config.yaml:
Base URLs
Model Studio’s OpenAI-compatible API is available in multiple regions. SetBAILIAN_BASE_URL to switch:
Model IDs
Common Qwen model identifiers — check the Model Studio model list for the current catalog:max_tokens compatibility
Model Studio deprecated max_tokens on 2026-04-20 (effective 2026-05-30).
Its compatible-mode models now require max_completion_tokens instead.
GoModel transparently maps the standard max_tokens parameter to
max_completion_tokens for every bailian provider request — send
max_tokens as you normally would, and GoModel rewrites it before forwarding to
Model Studio.
Supported features
Embedding models (
text-embedding-v3, text-embedding-v4) are served by
the compatible-mode API but are not auto-discovered from the upstream
/v1/models endpoint. Set BAILIAN_MODELS=text-embedding-v3,text-embedding-v4
or use CONFIGURED_PROVIDER_MODELS_MODE=allowlist to make them available.