update default enable path suffix in model mapper&router plugin (#1962)

This commit is contained in:
澄潭
2025-03-27 14:15:11 +08:00
committed by GitHub
parent d3887835a3
commit 96e4713703
2 changed files with 6 additions and 2 deletions

View File

@@ -41,7 +41,9 @@ struct ModelMapperConfigRule {
std::map<std::string, std::string> exact_model_mapping_;
std::vector<std::pair<std::string, std::string>> prefix_model_mapping_;
std::string default_model_mapping_;
std::vector<std::string> enable_on_path_suffix_ = {"/v1/chat/completions"};
std::vector<std::string> enable_on_path_suffix_ = {
"/completions", "/embeddings", "/images/generations",
"/audio/speech", "/fine_tuning/jobs", "/moderations"};
};
// PluginRootContext is the root context for all streams processed by the

View File

@@ -40,7 +40,9 @@ struct ModelRouterConfigRule {
std::string model_key_ = "model";
std::string add_provider_header_;
std::string model_to_header_;
std::vector<std::string> enable_on_path_suffix_ = {"/v1/chat/completions"};
std::vector<std::string> enable_on_path_suffix_ = {
"/completions", "/embeddings", "/images/generations",
"/audio/speech", "/fine_tuning/jobs", "/moderations"};
};
// PluginRootContext is the root context for all streams processed by the