fix: unblock live fixture recording
Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
This commit is contained in:
co-authored by
Simon Shi
parent
72a81d672f
commit
b1d66d6eb4
@@ -0,0 +1,9 @@
|
||||
export type RecorderStage = "patExchange" | "userinfo" | "modelList" | "chat";
|
||||
|
||||
export function classify(url: string): RecorderStage {
|
||||
if (url.includes("/jobToken/exchange")) return "patExchange";
|
||||
if (url.includes("/userinfo")) return "userinfo";
|
||||
if (url.includes("/model/list")) return "modelList";
|
||||
if (url.includes("/chat") || url.includes("/agent_chat_generation")) return "chat";
|
||||
throw new Error(`[live] refusing to record unexpected endpoint: ${new URL(url).pathname}`);
|
||||
}
|
||||
Reference in New Issue
Block a user