Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion open-sse/services/taskAwareRouting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const MAX_CONVERSATION_AFFINITY_ENTRIES = 1000;
* Task routing is additive: other strategies are wholly unaffected.
*/
export function isTaskRoutingStrategy(strategy: unknown): boolean {
return ["smart", "task", "task-aware", "task_aware", "auto"].includes(
return ["smart", "task", "task-aware", "task_aware"].includes(
String(strategy ?? "").toLowerCase()
);
}
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/combo-task-aware.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,10 @@ describe("reorderByTaskWeight", () => {

describe("isTaskRoutingStrategy", () => {
it("returns true for task-aware strategy names", () => {
for (const name of ["smart", "task", "task-aware", "task_aware", "auto"]) {
for (const name of ["smart", "task", "task-aware", "task_aware"]) {
assert.ok(isTaskRoutingStrategy(name), `Expected ${name} to be task-routing`);
}
assert.ok(!isTaskRoutingStrategy("auto"), "auto scoring must not be reordered by task routing");
});

it("is case-insensitive", () => {
Expand Down