github-actions[bot] commented on code in PR #67673:
URL: https://github.com/apache/doris/pull/67673#discussion_r3975780984
##########
be/src/exprs/function/ai/ai_adapter.h:
##########
@@ -87,7 +85,24 @@ struct AIResource {
buf.read_binary(retry_delay_second);
buf.read_binary(anthropic_version);
buf.read_binary(dimensions);
+ buf.read_binary(effort);
}
Review Comment:
[P1] Version the `AI_AGG` state before reading `effort`. During the
supported BE-first rolling upgrade, a new BE can merge a partial state written
by an old BE. That state ends after `dimensions`, but this reader
unconditionally consumes another length-prefixed string; `BufferReadable`
discarded the `ColumnString` row length, so it advances into padding or the
next state. This affects existing `AI_AGG` queries even when effort is unset.
Add a negotiated old/new format path (or retain the old state layout) and an
old-writer/new-reader multi-row test.
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/property/constants/AIProperties.java:
##########
@@ -53,29 +58,31 @@ public class AIProperties extends BaseProperties {
public static final String VALIDITY_CHECK = "ai.validity_check";
public static final List<String> REQUIRED_FIELDS = Arrays.asList(ENDPOINT,
PROVIDER_TYPE, MODEL_NAME);
+ public static final List<String> EMBED_REQUIRED_FIELDS =
+ Arrays.asList(EMBED_ENDPOINT, EMBED_PROVIDER_TYPE,
EMBED_MODEL_NAME);
public static final List<String> PROVIDERS
= Arrays.asList("OPENAI", "LOCAL", "GEMINI", "DEEPSEEK",
"ANTHROPIC",
"MOONSHOT", "QWEN", "MINIMAX", "ZHIPU", "BAICHUAN", "VOYAGEAI",
"JINA");
+ public static final List<String> EFFORT_LEVELS =
+ Arrays.asList("none", "minimal", "low", "medium", "high", "xhigh",
"max");
Review Comment:
[P2] Validate `ai.effort` for the selected provider (and model where
necessary) instead of accepting a global union. For example, Anthropic
documents only `low|medium|high|xhigh|max`, yet this accepts `none` and
`minimal`; BE then sends the value unchanged as `output_config.effort`, so the
resource passes CREATE/ALTER but its requests fail upstream. Other
provider/model sets differ as well. Split or translate validation, omit
unsupported fields, and add negative matrix tests. See
https://platform.claude.com/docs/en/build-with-claude/effort.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]