agent-rev 0.4.11 → 0.4.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.
@@ -235,7 +235,8 @@ export async function fetchQwenModels() {
235
235
  if (!token)
236
236
  return [];
237
237
  try {
238
- const res = await fetch('https://chat.qwen.ai/api/models', {
238
+ const host = token.resourceUrl ? `https://${token.resourceUrl}` : 'https://chat.qwen.ai';
239
+ const res = await fetch(`${host}/api/models`, {
239
240
  headers: { Authorization: `Bearer ${token.accessToken}` },
240
241
  });
241
242
  if (!res.ok)
@@ -252,7 +253,8 @@ export async function getQwenAccessToken() {
252
253
  return token?.accessToken || null;
253
254
  }
254
255
  async function callQwenAPIWithToken(token, prompt, model, onData) {
255
- const baseUrl = 'https://chat.qwen.ai/api/v1';
256
+ const host = token.resourceUrl ? `https://${token.resourceUrl}` : 'https://chat.qwen.ai';
257
+ const baseUrl = `${host}/api/v1`;
256
258
  const useStream = !!onData;
257
259
  const response = await fetch(`${baseUrl}/chat/completions`, {
258
260
  method: 'POST',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-rev",
3
- "version": "0.4.11",
3
+ "version": "0.4.12",
4
4
  "description": "Deterministic multi-agent CLI orchestrator — plan, code, review",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",