mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
Export and restore usage history, domain cost history, and domain budget data so analytics and budget state survive settings transfers. Also adjust cost overview fallbacks to rank by request volume when cost data is unavailable, count conversationState entries in chat request logging, and align e2e coverage with the proxy settings route.
18 lines
705 B
TypeScript
18 lines
705 B
TypeScript
import { buildKiroPayload } from "./open-sse/translator/request/openai-to-kiro.js";
|
|
|
|
const messages = [];
|
|
for (let i = 0; i < 2; i++) {
|
|
messages.push({ role: "user", content: `user ${i}` });
|
|
messages.push({ role: "assistant", content: `assistant ${i}` });
|
|
}
|
|
messages.push({ role: "user", content: "use tool" });
|
|
messages.push({
|
|
role: "assistant",
|
|
tool_calls: [{ id: "call_1", function: { name: "test", arguments: "{}" } }],
|
|
});
|
|
messages.push({ role: "tool", tool_call_id: "call_1", content: "ok" });
|
|
messages.push({ role: "user", content: "last user" });
|
|
|
|
const payload = buildKiroPayload("kr/claude-sonnet-4.5", { messages, tools: [] }, false, {});
|
|
console.log(JSON.stringify(payload, null, 2));
|