@fastagent/cli 0.6.6 → 0.6.12

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
@@ -81,6 +81,28 @@ fastagent doctor --config ./fastagent.config.json
81
81
  - `sandbox` 整段都是可选的;只有 remote sandbox 需要从配置文件注入地址/API key,或 local sandbox 需要自定义 launcher 时才需要填写
82
82
  - 当前配置示例文件是 `examples/fastagent.config.example.json`
83
83
 
84
+ ### OpenAI Responses `supportsPreviousResponse` 说明
85
+
86
+ 作用:
87
+
88
+ - 用于控制 `openai-responses` provider 是否走 `previous_response_id` anchored replay
89
+ - 不设置时,保持 `auto` 语义:CLI/IM 不显式下发该字段,交给 gateway 按 provider host 自动判断
90
+ - 设为 `true` 时,显式开启该 provider 的 stateful replay
91
+ - 设为 `false` 时,强制 full transcript replay
92
+
93
+ 配置位置:
94
+
95
+ - `fastagent.config.json.gateway.supportsPreviousResponse`
96
+ - `FASTAGENT_SUPPORTS_PREVIOUS_RESPONSE=true|false`
97
+
98
+ 补充:
99
+
100
+ - 示例里写成 `false` 只是保守配置示例,不代表运行时默认值
101
+ - 官方 host 在未显式关闭时默认开启
102
+ - 非官方 `openai-responses` host 在未显式开启时默认走 full transcript replay
103
+ - 如果设置了 `FASTAGENT_SUPPORTS_PREVIOUS_RESPONSE`,值必须是 `true|false|1|0`;非法值会在
104
+ CLI runtime config 解析阶段直接报错
105
+
84
106
  示例最小配置(IM 通道运行):
85
107
 
86
108
  ```json
@@ -92,6 +114,7 @@ fastagent doctor --config ./fastagent.config.json
92
114
  "baseUrl": "https://api.openai.com/v1",
93
115
  "userAgent": "fastagent-cli-example",
94
116
  "apiKey": "<your-api-key>",
117
+ "supportsPreviousResponse": false,
95
118
  "requestTimeoutMs": 60000,
96
119
  "maxRetries": 2
97
120
  },
@@ -153,6 +176,7 @@ export FASTAGENT_API_KEY=<your-key>
153
176
  export FASTAGENT_API_TYPE=openai-responses
154
177
  export FASTAGENT_BASE_URL=https://api.openai.com/v1
155
178
  export FASTAGENT_USER_AGENT=your-app-name
179
+ export FASTAGENT_SUPPORTS_PREVIOUS_RESPONSE=false
156
180
  ```
157
181
 
158
182
  `FASTAGENT_API_TYPE` 当前支持这些值:
@@ -167,6 +191,10 @@ export FASTAGENT_USER_AGENT=your-app-name
167
191
  - `anthropic` -> `anthropic-messages`
168
192
  - `google` / `gemini` / `google-ai-studio` -> `google-generative-ai`
169
193
  - 其他 provider 默认回落到 `openai-completions`
194
+ - 不设置 `FASTAGENT_SUPPORTS_PREVIOUS_RESPONSE` 时,运行时保持 `auto` 语义,由 gateway 自动判断
195
+ - `FASTAGENT_SUPPORTS_PREVIOUS_RESPONSE` 只在 `FASTAGENT_API_TYPE=openai-responses`
196
+ 时有意义;设为 `true` 显式启用 anchored replay,设为 `false` 强制 full transcript replay。
197
+ - `FASTAGENT_SUPPORTS_PREVIOUS_RESPONSE` 设为其他值时会直接报错,不会静默回退。
170
198
 
171
199
  ### 启动微信服务
172
200