Skip to content

Commit e112537

Browse files
XiaochenCuiKernelDeimos
authored andcommitted
ai: remove "delegate" field
1 parent 7d6c1ef commit e112537

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/backend/src/modules/airouter/AIChatService.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,6 @@ class AIChatService extends BaseService {
10451045
* @param {string} qualified_model - The model string to parse
10461046
* @param {string} intended_service - The originally intended service name
10471047
* @returns {string} returns.target_service - The target service name to use for the AI operation
1048-
* @returns {boolean} returns.delegate - Whether to delegate all responsibility to the target service, including usage tracking, model validation, etc. This is the desired behavior for the future, i.e., we can remove this field once all services are delegated.
10491048
* @returns {string} returns.supplier - The supplier (e.g., "openrouter") or null if not specified
10501049
* @returns {string} returns.vendor - The vendor (e.g., "openai") or null if not specified
10511050
* @returns {string} returns.model - The model name (e.g., "gpt-4o")
@@ -1066,22 +1065,19 @@ class AIChatService extends BaseService {
10661065

10671066
let result = {
10681067
target_service: intended_service,
1069-
delegate: false,
10701068
supplier,
10711069
vendor,
10721070
model,
10731071
};
10741072

10751073
if (intended_service !== 'ai-chat') {
1076-
result.delegate = true;
1074+
// Already have a valid target service, no need to infer.
10771075
return result;
10781076
}
10791077

10801078
let service = null;
10811079
if (supplier) {
10821080
result.target_service = supplier;
1083-
// We should delegate to the supplier if it is specified.
1084-
result.delegate = true;
10851081
} else if (vendor) {
10861082
result.target_service = vendor;
10871083
} else if (model) {

0 commit comments

Comments
 (0)