@autobusal/providers 1.32.0 → 1.33.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.33.0
4
+
5
+ ### Added
6
+
7
+ - **`LabelSettings.ai`** and **`LabelData.is_main`** - a label's per-provider AI configuration (`{providers: {openai: {status, api_key?, models?, default_model?, labels_allowed?}, ...}, default_provider}`) and whether this label IS the platform's main one, both needed by the new admin-label AI tab to know which fields to show.
8
+
3
9
  ## 1.32.0
4
10
 
5
11
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/providers",
3
- "version": "1.32.0",
3
+ "version": "1.33.0",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"
package/types/settings.ts CHANGED
@@ -127,6 +127,7 @@ export interface LabelData {
127
127
  id: number
128
128
  name: string
129
129
  internal: string
130
+ is_main: boolean
130
131
  settings: LabelSettings
131
132
  payments: LabelPayments
132
133
  }
@@ -314,6 +315,24 @@ export interface LabelSettings {
314
315
  preset: string
315
316
  overrides: Record<string, any>
316
317
  } | null
318
+
319
+ // Edited: Ferjolt Ozuni - Date: 2026-08-08
320
+ // Per-provider AI configuration - see obtapi's Labels\AdminController::
321
+ // ai() and Libraries\AI\Resolver. 'main' status is only ever meaningful
322
+ // on a non-main label (borrow the platform's key for that provider);
323
+ // labels_allowed is only ever meaningful on the main label (whether
324
+ // other labels may borrow THIS key). api_key/models/default_model are
325
+ // only present once status is 'dedicated'.
326
+ ai?: {
327
+ providers: Record<string, {
328
+ status: 'disabled' | 'dedicated' | 'main'
329
+ api_key?: string
330
+ models?: string[]
331
+ default_model?: string
332
+ labels_allowed?: boolean
333
+ }>
334
+ default_provider?: string
335
+ }
317
336
  }
318
337
 
319
338
  // Edited: Ferjolt Ozuni - Date: 2026-07-18