Add path_suffix to ProviderConfigToml and ProviderConfig
Adds an optional path_suffix field that lets users override the API path for OpenAI-compatible endpoints. When set, the suffix replaces the default /v1/<path> pattern, enabling use with endpoints that don't accept /v1/ prefixes (e.g. /chat/completions instead of /v1/chat/completions). Changes: - ProviderConfigToml (config crate): path_suffix field - ProviderConfig (tui crate): path_suffix field - merge_provider_config: propagates path_suffix - merge_project_provider_config: propagates path_suffix - api_url: delegates to new api_url_with_suffix function - api_url_with_suffix: uses suffix when present, skips /v1 versioning - DeepSeekClient: reads path_suffix from config, passes to URL builder - config.example.toml: documents the new option - Tests for the new URL building behavior Closes #2089
This commit is contained in:
@@ -273,6 +273,7 @@ max_subagents = 10 # optional (1-20)
|
||||
# base_url = "https://your-provider.example/v1"
|
||||
# model = "deepseek-ai/DeepSeek-V4-Pro"
|
||||
# http_headers = { "X-Model-Provider-Id" = "your-model-provider" } # optional custom request headers
|
||||
# path_suffix = "/chat/completions" # override the API path; skips /v1 versioning when set
|
||||
|
||||
# NVIDIA NIM-hosted DeepSeek V4 (https://build.nvidia.com)
|
||||
[providers.nvidia_nim]
|
||||
|
||||
Reference in New Issue
Block a user