@southwind-ai/shared 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/ai-runtime-report.ts +19 -0
package/package.json
CHANGED
package/src/ai-runtime-report.ts
CHANGED
|
@@ -93,6 +93,18 @@ export interface AiRuntimeRunUsage {
|
|
|
93
93
|
totalTokens: number | null;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
+
/**
|
|
97
|
+
* 一个 Run 中实际观察到的模型与 deployment 组合。
|
|
98
|
+
*
|
|
99
|
+
* `model` 优先采用 Provider 回报的模型名;Provider 未回报时才保留请求模型。
|
|
100
|
+
* 排序遵循该组合首次出现的 Attempt 顺序,避免在报表投影时伪造执行顺序。
|
|
101
|
+
*/
|
|
102
|
+
export interface AiRuntimeRunModelDeployment {
|
|
103
|
+
deploymentKey: string;
|
|
104
|
+
model: string;
|
|
105
|
+
attemptCount: number;
|
|
106
|
+
}
|
|
107
|
+
|
|
96
108
|
export interface AiRuntimeRunListItem {
|
|
97
109
|
runId: string;
|
|
98
110
|
operationKey: string;
|
|
@@ -102,6 +114,8 @@ export interface AiRuntimeRunListItem {
|
|
|
102
114
|
finishedAt: ISODateTime | null;
|
|
103
115
|
durationMs: number | null;
|
|
104
116
|
attemptCount: number;
|
|
117
|
+
modelDeployments: AiRuntimeRunModelDeployment[];
|
|
118
|
+
/** @deprecated 请使用包含 deployment 的 modelDeployments。 */
|
|
105
119
|
models: string[];
|
|
106
120
|
cacheStatus: AiRuntimeCacheStatus;
|
|
107
121
|
usage: AiRuntimeRunUsage;
|
|
@@ -112,6 +126,11 @@ export interface AiRuntimeAttemptDetail extends AiRuntimeRunUsage {
|
|
|
112
126
|
sequence: number;
|
|
113
127
|
toolRound: number;
|
|
114
128
|
deploymentKey: string;
|
|
129
|
+
/** 请求发送给 Provider 的模型名。 */
|
|
130
|
+
requestedModel: string;
|
|
131
|
+
/** Provider 响应中实际回报的模型名;缺失时不能推断。 */
|
|
132
|
+
reportedModel: string | null;
|
|
133
|
+
/** @deprecated 优先使用 reportedModel,缺失时使用 requestedModel。 */
|
|
115
134
|
model: string;
|
|
116
135
|
outcome: AiRuntimeAttemptOutcome;
|
|
117
136
|
cacheStatus: AiRuntimeCacheStatus;
|