@happyvertical/smrt-inference 0.60.16 → 0.60.18
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/dist/chunks/{InferenceOverrideCollection-Dat4TrK5.js → InferenceOverrideCollection-BS_hqxS9.js} +2 -2
- package/dist/chunks/{InferenceOverrideCollection-Dat4TrK5.js.map → InferenceOverrideCollection-BS_hqxS9.js.map} +1 -1
- package/dist/manifest.json +1 -1
- package/dist/models.js +1 -1
- package/dist/server.js +1 -1
- package/dist/smrt-knowledge.json +3 -3
- package/dist/svelte/components/InferenceAliasEditor.svelte +31 -23
- package/dist/svelte/components/InferenceDefaultView.svelte +58 -42
- package/dist/svelte/components/InferenceFusionList.svelte +33 -24
- package/dist/svelte/components/InferenceSettingsPanel.svelte +49 -37
- package/dist/svelte/components/InferenceTierRow.svelte +38 -30
- package/dist/svelte/components/InferenceTranscriptSettings.svelte +20 -14
- package/dist/svelte/components/InferenceUsageTable.svelte +28 -19
- package/package.json +10 -10
|
@@ -60,20 +60,20 @@ function revert(): void {
|
|
|
60
60
|
}
|
|
61
61
|
</script>
|
|
62
62
|
|
|
63
|
-
<div class="
|
|
63
|
+
<div class="smrt-inference-transcript-settings__root" data-testid="inference-transcripts" data-smrt-component="InferenceTranscriptSettings">
|
|
64
64
|
{#if settings.envEnabled !== null && settings.envEnabled !== undefined}
|
|
65
|
-
<p class="
|
|
65
|
+
<p class="smrt-inference-transcript-settings__hint" data-smrt-part="description" data-testid="inference-transcripts-env">
|
|
66
66
|
SMRT_INFERENCE_TRANSCRIPTS turns transcripts {settings.envEnabled ? 'on' : 'off'} over this setting.
|
|
67
67
|
</p>
|
|
68
68
|
{/if}
|
|
69
69
|
{#if editable}
|
|
70
|
-
<form class="
|
|
70
|
+
<form class="smrt-inference-transcript-settings__form" data-smrt-part="field" onsubmit={save} data-testid="inference-transcripts-form">
|
|
71
71
|
<label>
|
|
72
72
|
<input type="checkbox" name="enabled" checked={settings.enabled} disabled={busy} />
|
|
73
73
|
Store transcripts
|
|
74
74
|
</label>
|
|
75
75
|
<label>
|
|
76
|
-
<span class="
|
|
76
|
+
<span class="smrt-inference-transcript-settings__hint" data-smrt-part="description">Success sample rate (0–1)</span>
|
|
77
77
|
<input
|
|
78
78
|
type="number"
|
|
79
79
|
name="sample"
|
|
@@ -86,7 +86,7 @@ function revert(): void {
|
|
|
86
86
|
/>
|
|
87
87
|
</label>
|
|
88
88
|
<label>
|
|
89
|
-
<span class="
|
|
89
|
+
<span class="smrt-inference-transcript-settings__hint" data-smrt-part="description">Max bytes per call</span>
|
|
90
90
|
<input
|
|
91
91
|
type="number"
|
|
92
92
|
name="maxBytes"
|
|
@@ -107,7 +107,7 @@ function revert(): void {
|
|
|
107
107
|
{/if}
|
|
108
108
|
</form>
|
|
109
109
|
{/if}
|
|
110
|
-
<dl class="
|
|
110
|
+
<dl class="smrt-inference-transcript-settings__values" data-smrt-part="list">
|
|
111
111
|
{#if !editable}
|
|
112
112
|
<dt>Stored</dt>
|
|
113
113
|
<dd data-testid="inference-transcripts-enabled">{settings.enabled ? 'On' : 'Off'}</dd>
|
|
@@ -124,42 +124,48 @@ function revert(): void {
|
|
|
124
124
|
{/if}
|
|
125
125
|
</dl>
|
|
126
126
|
{#if settings.promptOverrides && settings.promptOverrides.length > 0}
|
|
127
|
-
<p class="
|
|
127
|
+
<p class="smrt-inference-transcript-settings__hint" data-smrt-part="description">
|
|
128
128
|
Config sets its own sample rate for {settings.promptOverrides.length} prompt key(s).
|
|
129
129
|
</p>
|
|
130
130
|
{/if}
|
|
131
131
|
{#if !editable}
|
|
132
|
-
<p class="
|
|
132
|
+
<p class="smrt-inference-transcript-settings__hint" data-smrt-part="description">App-wide setting; tenants cannot change it.</p>
|
|
133
133
|
{/if}
|
|
134
134
|
</div>
|
|
135
135
|
|
|
136
136
|
<style>
|
|
137
137
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
138
|
-
@layer smrt.
|
|
139
|
-
.
|
|
138
|
+
@layer smrt.structure {
|
|
139
|
+
.smrt-inference-transcript-settings__root {
|
|
140
140
|
display: flex;
|
|
141
141
|
flex-direction: column;
|
|
142
142
|
gap: 0.5rem;
|
|
143
143
|
}
|
|
144
|
-
.
|
|
144
|
+
.smrt-inference-transcript-settings__form {
|
|
145
145
|
display: flex;
|
|
146
146
|
gap: 0.75rem;
|
|
147
147
|
align-items: flex-end;
|
|
148
148
|
flex-wrap: wrap;
|
|
149
149
|
}
|
|
150
|
-
.
|
|
150
|
+
.smrt-inference-transcript-settings__values {
|
|
151
151
|
display: grid;
|
|
152
152
|
grid-template-columns: max-content 1fr;
|
|
153
153
|
gap: 0.25rem 0.75rem;
|
|
154
154
|
margin: 0;
|
|
155
155
|
}
|
|
156
|
-
.
|
|
156
|
+
.smrt-inference-transcript-settings__values dd {
|
|
157
157
|
margin: 0;
|
|
158
158
|
}
|
|
159
|
-
.
|
|
159
|
+
.smrt-inference-transcript-settings__hint {
|
|
160
160
|
margin: 0;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@layer smrt.theme {
|
|
165
|
+
.smrt-inference-transcript-settings__hint {
|
|
161
166
|
font-size: 0.8125rem;
|
|
162
167
|
color: var(--smrt-color-on-surface-variant);
|
|
163
168
|
}
|
|
164
169
|
}
|
|
170
|
+
|
|
165
171
|
</style>
|
|
@@ -70,15 +70,15 @@ function regroup(event: Event): void {
|
|
|
70
70
|
}
|
|
71
71
|
</script>
|
|
72
72
|
|
|
73
|
-
<div class="
|
|
73
|
+
<div class="smrt-inference-usage-table__root" data-testid="inference-usage" data-smrt-component="InferenceUsageTable">
|
|
74
74
|
{#if transcriptsEnabled === false}
|
|
75
|
-
<p class="
|
|
75
|
+
<p class="smrt-inference-usage-table__label" data-smrt-part="label" role="status" data-testid="inference-transcripts-off">
|
|
76
76
|
Transcripts are off; turn them on with <code>inference.transcripts.enabled</code> (Advanced, Transcripts) or <code>SMRT_INFERENCE_TRANSCRIPTS=1</code>.
|
|
77
77
|
</p>
|
|
78
78
|
{/if}
|
|
79
79
|
{#if onUsageGroupBy}
|
|
80
|
-
<form class="
|
|
81
|
-
<span class="
|
|
80
|
+
<form class="smrt-inference-usage-table__group" data-smrt-part="field">
|
|
81
|
+
<span class="smrt-inference-usage-table__label" data-smrt-part="label">Group by</span>
|
|
82
82
|
{#each DIMENSIONS as dimension (dimension.id)}
|
|
83
83
|
<label>
|
|
84
84
|
<input
|
|
@@ -95,10 +95,10 @@ function regroup(event: Event): void {
|
|
|
95
95
|
</form>
|
|
96
96
|
{/if}
|
|
97
97
|
{#if !usage || usage.buckets.length === 0}
|
|
98
|
-
<p class="
|
|
98
|
+
<p class="smrt-inference-usage-table__label" data-smrt-part="label">No usage recorded yet.</p>
|
|
99
99
|
{:else}
|
|
100
|
-
<table class="
|
|
101
|
-
<thead>
|
|
100
|
+
<table class="smrt-inference-usage-table__table" data-smrt-part="table">
|
|
101
|
+
<thead data-smrt-part="header">
|
|
102
102
|
<tr>
|
|
103
103
|
{#each columns as column (column)}
|
|
104
104
|
<th scope="col">{DIMENSIONS.find((entry) => entry.id === column)?.label ?? column}</th>
|
|
@@ -110,7 +110,7 @@ function regroup(event: Event): void {
|
|
|
110
110
|
{#if showTranscripts}<th scope="col">Transcripts</th>{/if}
|
|
111
111
|
</tr>
|
|
112
112
|
</thead>
|
|
113
|
-
<tbody>
|
|
113
|
+
<tbody data-smrt-part="body">
|
|
114
114
|
{#each usage.buckets as bucket, index (index)}
|
|
115
115
|
<tr>
|
|
116
116
|
{#each columns as column (column)}
|
|
@@ -120,7 +120,7 @@ function regroup(event: Event): void {
|
|
|
120
120
|
<td>{bucket.totalTokens}</td>
|
|
121
121
|
<td>
|
|
122
122
|
${bucket.estimatedCost.toFixed(4)}
|
|
123
|
-
{#if bucket.uncostedCalls}<span class="
|
|
123
|
+
{#if bucket.uncostedCalls}<span class="smrt-inference-usage-table__label" data-smrt-part="label">({bucket.uncostedCalls} uncosted)</span>{/if}
|
|
124
124
|
</td>
|
|
125
125
|
<td>
|
|
126
126
|
{#each outcomeEntries(bucket.outcomes) as [label, count], position (label)}
|
|
@@ -141,37 +141,46 @@ function regroup(event: Event): void {
|
|
|
141
141
|
{/each}
|
|
142
142
|
</tbody>
|
|
143
143
|
</table>
|
|
144
|
-
{#if usage.costBasis}<p class="
|
|
144
|
+
{#if usage.costBasis}<p class="smrt-inference-usage-table__label" data-smrt-part="label">{usage.costBasis}</p>{/if}
|
|
145
145
|
{/if}
|
|
146
146
|
</div>
|
|
147
147
|
|
|
148
148
|
<style>
|
|
149
149
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
150
|
-
@layer smrt.
|
|
151
|
-
.
|
|
150
|
+
@layer smrt.structure {
|
|
151
|
+
.smrt-inference-usage-table__root {
|
|
152
152
|
display: flex;
|
|
153
153
|
flex-direction: column;
|
|
154
154
|
gap: 0.75rem;
|
|
155
155
|
}
|
|
156
|
-
.
|
|
156
|
+
.smrt-inference-usage-table__group {
|
|
157
157
|
display: flex;
|
|
158
158
|
gap: 0.75rem;
|
|
159
159
|
align-items: center;
|
|
160
160
|
}
|
|
161
|
-
.
|
|
161
|
+
.smrt-inference-usage-table__table th,
|
|
162
|
+
.smrt-inference-usage-table__table td {
|
|
163
|
+
padding: 0.25rem 0.75rem 0.25rem 0;
|
|
164
|
+
}
|
|
165
|
+
.smrt-inference-usage-table__label {
|
|
166
|
+
margin: 0;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
@layer smrt.theme {
|
|
171
|
+
.smrt-inference-usage-table__table {
|
|
162
172
|
border-collapse: collapse;
|
|
163
173
|
font-size: 0.875rem;
|
|
164
174
|
}
|
|
165
|
-
.
|
|
166
|
-
.
|
|
175
|
+
.smrt-inference-usage-table__table th,
|
|
176
|
+
.smrt-inference-usage-table__table td {
|
|
167
177
|
text-align: left;
|
|
168
|
-
padding: 0.25rem 0.75rem 0.25rem 0;
|
|
169
178
|
border-bottom: var(--smrt-hairline);
|
|
170
179
|
}
|
|
171
|
-
.
|
|
172
|
-
margin: 0;
|
|
180
|
+
.smrt-inference-usage-table__label {
|
|
173
181
|
font-size: 0.8125rem;
|
|
174
182
|
color: var(--smrt-color-on-surface-variant);
|
|
175
183
|
}
|
|
176
184
|
}
|
|
185
|
+
|
|
177
186
|
</style>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-inference",
|
|
3
|
-
"version": "0.60.
|
|
3
|
+
"version": "0.60.18",
|
|
4
4
|
"description": "Inference alias chains with classified failures, recorded fallback and ladder degradation, consumer-defined fusions, per-user and per-tenant bindings, the InferenceSettingsPanel, hosted provisioning and spend gate, and the smrt doctor --ai binding check, for SMRT inference tiers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -45,17 +45,17 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@happyvertical/ai": "^0.
|
|
49
|
-
"@happyvertical/smrt-config": "0.60.
|
|
50
|
-
"@happyvertical/smrt-core": "0.60.
|
|
51
|
-
"@happyvertical/smrt-prompts": "0.60.
|
|
52
|
-
"@happyvertical/smrt-secrets": "0.60.
|
|
53
|
-
"@happyvertical/smrt-tenancy": "0.60.
|
|
54
|
-
"@happyvertical/smrt-users": "0.60.
|
|
55
|
-
"@happyvertical/sql": "^0.
|
|
48
|
+
"@happyvertical/ai": "^0.112.2",
|
|
49
|
+
"@happyvertical/smrt-config": "0.60.18",
|
|
50
|
+
"@happyvertical/smrt-core": "0.60.18",
|
|
51
|
+
"@happyvertical/smrt-prompts": "0.60.18",
|
|
52
|
+
"@happyvertical/smrt-secrets": "0.60.18",
|
|
53
|
+
"@happyvertical/smrt-tenancy": "0.60.18",
|
|
54
|
+
"@happyvertical/smrt-users": "0.60.18",
|
|
55
|
+
"@happyvertical/sql": "^0.112.2"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@happyvertical/smrt-vitest": "0.60.
|
|
58
|
+
"@happyvertical/smrt-vitest": "0.60.18",
|
|
59
59
|
"@sveltejs/package": "^2.5.8",
|
|
60
60
|
"@sveltejs/vite-plugin-svelte": "^7.3.0",
|
|
61
61
|
"@types/node": "24.13.6",
|