Skip to content

Commit cc5ab7e

Browse files
fix: Remove individual agent env vars, keep only full JSON config
The agent configuration is designed to support multiple models, so having individual environment variables for a single model doesn't align with the feature's multi-model design. This commit keeps only PARSE_DASHBOARD_AGENT_CONFIG which accepts a JSON string with the full agent configuration. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 4864ab7 commit cc5ab7e

File tree

2 files changed

+2
-33
lines changed

2 files changed

+2
-33
lines changed

Parse-Dashboard/server.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ module.exports = (options) => {
4040
const configSSLKey = options.sslKey || process.env.PARSE_DASHBOARD_SSL_KEY;
4141
const configSSLCert = options.sslCert || process.env.PARSE_DASHBOARD_SSL_CERT;
4242
const configAgentConfig = options.agentConfig || process.env.PARSE_DASHBOARD_AGENT_CONFIG;
43-
const configAgentModelName = options.agentModelName || process.env.PARSE_DASHBOARD_AGENT_MODEL_NAME;
44-
const configAgentModelProvider = options.agentModelProvider || process.env.PARSE_DASHBOARD_AGENT_MODEL_PROVIDER;
45-
const configAgentModel = options.agentModel || process.env.PARSE_DASHBOARD_AGENT_MODEL;
46-
const configAgentApiKey = options.agentApiKey || process.env.PARSE_DASHBOARD_AGENT_API_KEY;
4743

4844
function handleSIGs(server) {
4945
const signals = {
@@ -96,15 +92,6 @@ module.exports = (options) => {
9692
console.error('Failed to parse PARSE_DASHBOARD_AGENT_CONFIG:', error.message);
9793
process.exit(1);
9894
}
99-
} else if (configAgentModelName && configAgentModelProvider && configAgentModel && configAgentApiKey) {
100-
configFromCLI.data.agent = {
101-
models: [{
102-
name: configAgentModelName,
103-
provider: configAgentModelProvider,
104-
model: configAgentModel,
105-
apiKey: configAgentApiKey
106-
}]
107-
};
10895
}
10996
} else if (!configServerURL && !configMasterKey && !configAppName) {
11097
configFile = path.join(__dirname, 'parse-dashboard-config.json');

README.md

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,6 @@ PARSE_DASHBOARD_SSL_CERT: "sslCert"
214214
PARSE_DASHBOARD_CONFIG: undefined // Only for reference, it must not exist
215215
PARSE_DASHBOARD_COOKIE_SESSION_SECRET: undefined // set the cookie session secret, defaults to a random string. Use this option if you want sessions to work across multiple servers, or across restarts
216216
PARSE_DASHBOARD_AGENT_CONFIG: undefined // JSON string containing the full agent configuration with models array
217-
PARSE_DASHBOARD_AGENT_MODEL_NAME: undefined // Display name for the AI model (e.g. "ChatGPT 4.1")
218-
PARSE_DASHBOARD_AGENT_MODEL_PROVIDER: undefined // AI provider identifier (e.g. "openai")
219-
PARSE_DASHBOARD_AGENT_MODEL: undefined // Specific model name from the provider (e.g. "gpt-4.1")
220-
PARSE_DASHBOARD_AGENT_API_KEY: undefined // API key for authenticating with the AI provider
221217
222218
```
223219

@@ -1314,27 +1310,13 @@ The agent will use the configured models to process natural language commands an
13141310

13151311
You can also configure the AI agent using environment variables, which is useful for containerized deployments or when you want to avoid storing API keys in configuration files.
13161312

1317-
#### Option 1: Full JSON Configuration
1318-
1319-
For complex setups with multiple models, you can provide the entire agent configuration as a JSON string:
1313+
Set the `PARSE_DASHBOARD_AGENT_CONFIG` environment variable with a JSON string containing the full agent configuration:
13201314

13211315
```
13221316
PARSE_DASHBOARD_AGENT_CONFIG='{"models":[{"name":"ChatGPT 4.1","provider":"openai","model":"gpt-4.1","apiKey":"YOUR_API_KEY"}]}'
13231317
```
13241318

1325-
#### Option 2: Individual Environment Variables
1326-
1327-
For simpler setups with a single model, you can use individual environment variables:
1328-
1329-
```
1330-
PARSE_DASHBOARD_AGENT_MODEL_NAME="ChatGPT 4.1"
1331-
PARSE_DASHBOARD_AGENT_MODEL_PROVIDER="openai"
1332-
PARSE_DASHBOARD_AGENT_MODEL="gpt-4.1"
1333-
PARSE_DASHBOARD_AGENT_API_KEY="YOUR_API_KEY"
1334-
```
1335-
1336-
> [!Note]
1337-
> If both `PARSE_DASHBOARD_AGENT_CONFIG` and individual variables are provided, `PARSE_DASHBOARD_AGENT_CONFIG` takes precedence.
1319+
This supports the same multi-model configuration structure as the JSON config file, allowing you to define multiple AI models in the array.
13381320

13391321
### Providers
13401322

0 commit comments

Comments
 (0)