Improve AI provider error messages#149
Conversation
| LOG_USER_ERROR(OB_NOT_SUPPORTED, "this provider current is"); | ||
| log_provider_not_supported("ai_complete", | ||
| provider, | ||
| "openai, aliyun, deepseek, siliconflow, hunyuan, dashscope"); |
There was a problem hiding this comment.
please use variables such as ObAIFuncProviderUtils::ALIYUN
|
Aligned with repo style: replaced ObSqlString with databuff_printf + fixed buffer in provider error message helper. This keeps error clarity while reducing deps. |
|
Addressed review: extracted supported provider lists into constants (COMPLETE/EMBED/RERANK_SUPPORTED_PROVIDERS) and reused in error helper. |
|
Refactored provider checks to reuse helper functions and avoid repeating ob_provider_check chains, per suggestion. Kept behavior same; dashscope still routes to Dashscope impl. |
| } | ||
|
|
||
| static const char *const COMPLETE_SUPPORTED_PROVIDERS = | ||
| "openai, aliyun, deepseek, siliconflow, hunyuan, dashscope"; |
There was a problem hiding this comment.
ObAIFuncProviderUtils::OPENAI
|
Updated supported provider list strings to use ObAIFuncProviderUtils names (e.g., OPENAI, ALIYUN-OPENAI, ALIYUN-DASHSCOPE) for clarity and consistency with allowed values. |
|
Updated supported provider list to build from ObAIFuncProviderUtils constants (no hand-written strings). Added helper to join list into message with databuff_printf. |
|
Fixed CI error: qualified ob_provider_check with ObAIFuncUtils in helper functions. Pushed commit 4255f47. |
Summary
Testing
Refs #103