@iinm/plain-agent 1.7.0 → 1.7.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/README.md CHANGED
@@ -66,7 +66,7 @@ Create the configuration.
66
66
  {
67
67
  // Requires Azure CLI to get access token
68
68
  "name": "azure",
69
- "variant": "default",
69
+ "variant": "openai",
70
70
  "baseURL": "https://<resource>.openai.azure.com/openai",
71
71
  // Optional
72
72
  "azureConfigDir": "/home/xxx/.azure-for-agent"
@@ -131,21 +131,27 @@ Create the configuration.
131
131
  {
132
132
  "platforms": [
133
133
  {
134
- "name": "openai",
134
+ "name": "openai-compatible",
135
135
  "variant": "ollama",
136
136
  "baseURL": "https://ollama.com",
137
137
  "apiKey": "FIXME"
138
138
  },
139
139
  {
140
- "name": "openai",
140
+ "name": "openai-compatible",
141
141
  "variant": "huggingface",
142
142
  "baseURL": "https://router.huggingface.co",
143
143
  "apiKey": "FIXME"
144
144
  },
145
145
  {
146
- "name": "openai",
146
+ "name": "openai-compatible",
147
147
  "variant": "xai",
148
148
  "apiKey": "FIXME"
149
+ },
150
+ {
151
+ "name": "openai-compatible",
152
+ "variant": "fireworks",
153
+ "baseURL": "https://api.fireworks.ai/inference",
154
+ "apiKey": "FIXME"
149
155
  }
150
156
  ]
151
157
  }
@@ -891,7 +891,7 @@
891
891
  "variant": "thinking-medium-azure",
892
892
  "platform": {
893
893
  "name": "azure",
894
- "variant": "default"
894
+ "variant": "openai"
895
895
  },
896
896
  "model": {
897
897
  "format": "openai-responses",
@@ -972,10 +972,33 @@
972
972
  }
973
973
  },
974
974
  {
975
- "name": "glm-5",
975
+ "name": "glm-5.1",
976
+ "variant": "fireworks",
977
+ "platform": {
978
+ "name": "openai-compatible",
979
+ "variant": "fireworks"
980
+ },
981
+ "model": {
982
+ "format": "openai-messages",
983
+ "config": {
984
+ "model": "accounts/fireworks/models/glm-5p1"
985
+ }
986
+ },
987
+ "cost": {
988
+ "currency": "USD",
989
+ "unit": "1M",
990
+ "costs": {
991
+ "prompt_tokens": 1.4,
992
+ "prompt_tokens_details.cached_tokens": -1.14,
993
+ "completion_tokens": 4.4
994
+ }
995
+ }
996
+ },
997
+ {
998
+ "name": "glm-5.1",
976
999
  "variant": "ollama",
977
1000
  "platform": {
978
- "name": "openai",
1001
+ "name": "openai-compatible",
979
1002
  "variant": "ollama"
980
1003
  },
981
1004
  "model": {
@@ -986,16 +1009,16 @@
986
1009
  }
987
1010
  },
988
1011
  {
989
- "name": "glm-5",
1012
+ "name": "glm-5.1",
990
1013
  "variant": "huggingface",
991
1014
  "platform": {
992
- "name": "openai",
1015
+ "name": "openai-compatible",
993
1016
  "variant": "huggingface"
994
1017
  },
995
1018
  "model": {
996
1019
  "format": "openai-messages",
997
1020
  "config": {
998
- "model": "zai-org/GLM-5:novita"
1021
+ "model": "zai-org/GLM-5.1:together"
999
1022
  }
1000
1023
  }
1001
1024
  },
@@ -1066,7 +1089,7 @@
1066
1089
  "name": "minimax-m2.7",
1067
1090
  "variant": "ollama",
1068
1091
  "platform": {
1069
- "name": "openai",
1092
+ "name": "openai-compatible",
1070
1093
  "variant": "ollama"
1071
1094
  },
1072
1095
  "model": {
@@ -1091,6 +1114,58 @@
1091
1114
  }
1092
1115
  }
1093
1116
  },
1117
+ {
1118
+ "name": "qwen3.6-plus",
1119
+ "variant": "fireworks",
1120
+ "platform": {
1121
+ "name": "openai-compatible",
1122
+ "variant": "fireworks"
1123
+ },
1124
+ "model": {
1125
+ "format": "openai-messages",
1126
+ "config": {
1127
+ "model": "accounts/fireworks/models/qwen3p6-plus"
1128
+ }
1129
+ },
1130
+ "cost": {
1131
+ "currency": "USD",
1132
+ "unit": "1M",
1133
+ "costs": {
1134
+ "prompt_tokens": 0.5,
1135
+ "prompt_tokens_details.cached_tokens": -0.4,
1136
+ "completion_tokens": 3
1137
+ }
1138
+ }
1139
+ },
1140
+
1141
+ {
1142
+ "name": "gemma4",
1143
+ "variant": "ollama",
1144
+ "platform": {
1145
+ "name": "openai-compatible",
1146
+ "variant": "ollama"
1147
+ },
1148
+ "model": {
1149
+ "format": "openai-responses",
1150
+ "config": {
1151
+ "model": "gemma4:31b-cloud"
1152
+ }
1153
+ }
1154
+ },
1155
+ {
1156
+ "name": "gemma4",
1157
+ "variant": "huggingface",
1158
+ "platform": {
1159
+ "name": "openai-compatible",
1160
+ "variant": "huggingface"
1161
+ },
1162
+ "model": {
1163
+ "format": "openai-messages",
1164
+ "config": {
1165
+ "model": "google/gemma-4-31B-it:together"
1166
+ }
1167
+ }
1168
+ },
1094
1169
 
1095
1170
  {
1096
1171
  "name": "nova-2-lite",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iinm/plain-agent",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "A lightweight CLI-based coding agent",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -18,7 +18,7 @@
18
18
  "files": [
19
19
  "bin",
20
20
  "sandbox/bin",
21
- ".config",
21
+ "config",
22
22
  "src/**/*.mjs",
23
23
  "src/**/*.d.ts",
24
24
  "!src/**/*.test.mjs",
package/src/config.mjs CHANGED
@@ -34,7 +34,7 @@ export async function loadAppConfig(options = {}) {
34
34
  } = options;
35
35
 
36
36
  // Always load predefined config
37
- const paths = [`${AGENT_ROOT}/.config/config.predefined.json`];
37
+ const paths = [`${AGENT_ROOT}/config/config.predefined.json`];
38
38
 
39
39
  if (!skipUserConfig) {
40
40
  paths.push(
@@ -30,7 +30,7 @@ export async function loadAgentRoles(claudeCodePlugins) {
30
30
  /** @type {Array<{dir: string, idPrefix: string, only?: RegExp}>} */
31
31
  const agentDirs = [
32
32
  {
33
- dir: path.resolve(AGENT_ROOT, ".config", "agents.predefined"),
33
+ dir: path.resolve(AGENT_ROOT, "config", "agents.predefined"),
34
34
  idPrefix: "",
35
35
  },
36
36
  { dir: path.resolve(AGENT_USER_CONFIG_DIR, "agents"), idPrefix: "" },
@@ -34,7 +34,7 @@ export async function loadPrompts(claudeCodePlugins) {
34
34
  /** @type {Array<{dir: string, idPrefix: string, only?: RegExp}>} */
35
35
  const promptDirs = [
36
36
  {
37
- dir: path.resolve(AGENT_ROOT, ".config", "prompts.predefined"),
37
+ dir: path.resolve(AGENT_ROOT, "config", "prompts.predefined"),
38
38
  idPrefix: "",
39
39
  },
40
40
  { dir: path.resolve(AGENT_USER_CONFIG_DIR, "prompts"), idPrefix: "" },
@@ -34,6 +34,13 @@ export type PlatformConfig =
34
34
  customHeaders?: Record<string, string>;
35
35
  apiKey: string;
36
36
  }
37
+ | {
38
+ name: "openai-compatible";
39
+ variant: string;
40
+ baseURL: string;
41
+ customHeaders?: Record<string, string>;
42
+ apiKey: string;
43
+ }
37
44
  | {
38
45
  name: "azure";
39
46
  variant: string;
@@ -36,6 +36,7 @@ export async function callOpenAICompatibleModel(
36
36
 
37
37
  switch (platformConfig.name) {
38
38
  case "openai":
39
+ case "openai-compatible":
39
40
  return `${baseURL}/v1/chat/completions`;
40
41
  case "bedrock":
41
42
  return `${baseURL}/model/${modelConfig.model}/invoke-with-response-stream`;
@@ -50,6 +51,7 @@ export async function callOpenAICompatibleModel(
50
51
  const headers = await (async () => {
51
52
  switch (platformConfig.name) {
52
53
  case "openai":
54
+ case "openai-compatible":
53
55
  return {
54
56
  ...platformConfig.customHeaders,
55
57
  Authorization: `Bearer ${platformConfig.apiKey}`,
@@ -68,6 +70,7 @@ export async function callOpenAICompatibleModel(
68
70
  const platformRequest = (() => {
69
71
  switch (platformConfig.name) {
70
72
  case "openai":
73
+ case "openai-compatible":
71
74
  return {
72
75
  ...modelConfig,
73
76
  stream: true,
File without changes