@budibase/worker 3.8.6 → 3.9.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/worker",
3
3
  "email": "hi@budibase.com",
4
- "version": "3.8.6",
4
+ "version": "3.9.1",
5
5
  "description": "Budibase background service",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -50,7 +50,7 @@
50
50
  "bcrypt": "5.1.0",
51
51
  "bcryptjs": "2.4.3",
52
52
  "bull": "4.10.1",
53
- "dd-trace": "5.43.0",
53
+ "dd-trace": "5.47.0",
54
54
  "dotenv": "8.6.0",
55
55
  "email-validator": "^2.0.4",
56
56
  "global-agent": "3.0.0",
@@ -120,5 +120,5 @@
120
120
  }
121
121
  }
122
122
  },
123
- "gitHead": "74dd49640111c5d634c8a8417ce4019cdc1a77b0"
123
+ "gitHead": "47ec626edb1cf53f7bcae95fc6496d2044235052"
124
124
  }
@@ -8,7 +8,7 @@ import {
8
8
  auth as authCore,
9
9
  } from "@budibase/backend-core"
10
10
  import env from "../../../environment"
11
- import { groups } from "@budibase/pro"
11
+ import { ai, groups } from "@budibase/pro"
12
12
  import {
13
13
  DevInfo,
14
14
  FetchAPIKeyResponse,
@@ -115,11 +115,20 @@ export async function getSelf(ctx: UserCtx<void, GetGlobalSelfResponse>) {
115
115
 
116
116
  // add the feature flags for this tenant
117
117
  const flags = await features.flags.fetch()
118
+ const llmConfig = await ai.getLLMConfig()
119
+ const sanitisedLLMConfig = llmConfig
120
+ ? {
121
+ provider: llmConfig.provider,
122
+ model: llmConfig.model,
123
+ measureUsage: llmConfig.measureUsage,
124
+ }
125
+ : undefined
118
126
 
119
127
  ctx.body = {
120
128
  ...enrichedUser,
121
129
  ...sessionAttributes,
122
130
  flags,
131
+ llm: sanitisedLLMConfig,
123
132
  }
124
133
  }
125
134