@jclvsh/iris 0.5.5 → 0.6.0
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/dist/client.js +6 -3
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -41,9 +41,12 @@ export class IrisClient {
|
|
|
41
41
|
"Get a valid API key from https://iris-ai.dev/settings/api-keys");
|
|
42
42
|
}
|
|
43
43
|
this.apiKey = apiKey;
|
|
44
|
-
// Default to
|
|
45
|
-
//
|
|
46
|
-
|
|
44
|
+
// Default to api.iris-ai.dev (Stripe/GitHub/OpenAI convention). The api host
|
|
45
|
+
// rewrites /<resource> → /api/v1/<resource> via middleware (see iris/src/proxy.ts),
|
|
46
|
+
// so callers no longer pass the /api/v1/ prefix. Override via IRIS_API_URL if needed.
|
|
47
|
+
// Older versions (≤0.5.5) defaulted to https://www.iris-ai.dev/api/v1 — that host
|
|
48
|
+
// still responds, but the api host is canonical going forward.
|
|
49
|
+
this.baseUrl = (process.env.IRIS_API_URL || "https://api.iris-ai.dev").replace(/\/+$/, "");
|
|
47
50
|
}
|
|
48
51
|
async get(path, params) {
|
|
49
52
|
const url = new URL(`${this.baseUrl}${path}`);
|