@frontera-sdk/chat 1.50.59 → 1.50.60

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/types.ts +30 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontera-sdk/chat",
3
- "version": "1.50.59",
3
+ "version": "1.50.60",
4
4
  "description": "Typed client and React hooks for chatting with a Frontera agent from your own application.",
5
5
  "keywords": [
6
6
  "frontera",
@@ -77,7 +77,7 @@
77
77
  "smoke": "bun run scripts/smoke.ts"
78
78
  },
79
79
  "dependencies": {
80
- "@frontera-sdk/core": "1.50.59"
80
+ "@frontera-sdk/core": "1.50.60"
81
81
  },
82
82
  "peerDependencies": {
83
83
  "@ai-sdk/react": "^3.0.0",
package/src/types.ts CHANGED
@@ -176,12 +176,42 @@ export interface ChatArtifact {
176
176
  }
177
177
 
178
178
  /** An agent the current credential may talk to — enough to draw a picker. */
179
+ /**
180
+ * One model choice an agent offers.
181
+ *
182
+ * `/v1/chat-agents` omits `modelId`, `model` and `provider` on purpose: those
183
+ * are the exact checkpoint the deployment runs, and nothing a chat needs to
184
+ * draw a picker. `name` is a LABEL, not that identifier — the operator's own
185
+ * wording when they set one, and the catalog's when they did not, which does
186
+ * name a vendor ("Claude Sonnet 5") and is what a vendor glyph is chosen from.
187
+ * Nothing here can be sent back to pin a request to a model.
188
+ *
189
+ * `reasoning` is what decides whether an effort control appears beside the
190
+ * model: a mode without it offers a model and nothing else.
191
+ */
192
+ export interface ChatAgentMode {
193
+ key: string
194
+ name: string
195
+ description?: string
196
+ style?: string
197
+ reasoning?: {
198
+ style?: string
199
+ supportedEfforts?: string[]
200
+ defaultEffort?: string
201
+ [key: string]: unknown
202
+ }
203
+ }
204
+
179
205
  export interface ChatAgent {
180
206
  id: string
181
207
  agentId: string
182
208
  name: string
183
209
  description?: string | null
184
210
  avatarConfig?: unknown
211
+ /** The agent's own model choices. Empty or single → nothing to pick between. */
212
+ modes?: ChatAgentMode[]
213
+ /** The mode the agent starts in, as configured on the deployment. */
214
+ defaultMode?: string | null
185
215
  }
186
216
 
187
217
  // --- approvals ---