@axiom-lattice/gateway 2.1.45 → 2.1.46

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@axiom-lattice/gateway",
3
- "version": "2.1.45",
3
+ "version": "2.1.46",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -38,10 +38,10 @@
38
38
  "pg": "^8.11.0",
39
39
  "redis": "^5.0.1",
40
40
  "uuid": "^9.0.1",
41
- "@axiom-lattice/core": "2.1.39",
42
- "@axiom-lattice/pg-stores": "1.0.29",
43
- "@axiom-lattice/protocols": "2.1.21",
44
- "@axiom-lattice/queue-redis": "1.0.20"
41
+ "@axiom-lattice/core": "2.1.40",
42
+ "@axiom-lattice/pg-stores": "1.0.30",
43
+ "@axiom-lattice/protocols": "2.1.22",
44
+ "@axiom-lattice/queue-redis": "1.0.21"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/jest": "^29.5.14",
@@ -43,6 +43,7 @@ function extractModelKey(tenantId: string, tenantModelKey: string): string {
43
43
  interface ModelConfig {
44
44
  key: string;
45
45
  model: string;
46
+ displayName?: string;
46
47
  provider: "azure" | "openai" | "deepseek" | "siliconcloud" | "volcengine";
47
48
  streaming?: boolean;
48
49
  apiKey?: string;
@@ -75,10 +76,16 @@ export async function getModels(request: FastifyRequest, reply: FastifyReply) {
75
76
  // Extract config from the lattice client
76
77
  // Note: This is a simplified approach - you may need to adjust based on actual implementation
77
78
  const config = (lattice.client as any).config || {};
79
+ // Use provided displayName or auto-generate from key
80
+ const displayName = config.displayName || lattice.key
81
+ .split('-')
82
+ .map(word => word.charAt(0).toUpperCase() + word.slice(1))
83
+ .join(' ');
78
84
  return {
79
85
  key: lattice.key,
80
86
  model: config.model || "",
81
87
  provider: config.provider || "openai",
88
+ displayName: displayName,
82
89
  streaming: config.streaming || false,
83
90
  apiKey: config.apiKey || "",
84
91
  baseURL: config.baseURL || "",
@@ -144,6 +151,7 @@ export async function updateModels(
144
151
  const llmConfig: LLMConfig = {
145
152
  provider: modelConfig.provider,
146
153
  model: modelConfig.model,
154
+ displayName: modelConfig.displayName,
147
155
  streaming: modelConfig.streaming ?? false,
148
156
  apiKey: modelConfig.apiKey,
149
157
  baseURL: modelConfig.baseURL,
@@ -73,6 +73,7 @@ export const createRun = async (
73
73
  const result = await agent.addMessage({
74
74
  input,
75
75
  command,
76
+ custom_run_config,
76
77
  });
77
78
 
78
79
  // const agentStatus = await agent.getRunStatus()
@@ -114,6 +115,7 @@ export const createRun = async (
114
115
  const result = await agent.invoke({
115
116
  input: { message: msg, ...restInputNonStream },
116
117
  command,
118
+ custom_run_config,
117
119
  });
118
120
  reply.status(200).send({
119
121
  success: true,