@aion0/forge 0.10.4 → 0.10.5
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/RELEASE_NOTES.md +4 -4
- package/lib/chat/llm/anthropic.ts +8 -1
- package/package.json +1 -1
package/RELEASE_NOTES.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# Forge v0.10.
|
|
1
|
+
# Forge v0.10.5
|
|
2
2
|
|
|
3
3
|
Released: 2026-05-30
|
|
4
4
|
|
|
5
|
-
## Changes since v0.10.
|
|
5
|
+
## Changes since v0.10.4
|
|
6
6
|
|
|
7
7
|
### Other
|
|
8
|
-
- fix(
|
|
8
|
+
- fix(chat/anthropic): normalize baseURL to include /v1 (fix Not Found regression)
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
**Full Changelog**: https://github.com/aiwatching/forge/compare/v0.10.
|
|
11
|
+
**Full Changelog**: https://github.com/aiwatching/forge/compare/v0.10.4...v0.10.5
|
|
@@ -50,9 +50,16 @@ function decodeToolName(name: string): string { return name.replace(/__/g, '.');
|
|
|
50
50
|
|
|
51
51
|
function makeClient(apiKey: string, baseUrl: string) {
|
|
52
52
|
const oauth = isOauthToken(apiKey);
|
|
53
|
+
// @ai-sdk/anthropic appends `/messages` directly onto the baseURL (unlike
|
|
54
|
+
// @anthropic-ai/sdk which inserts `/v1/`). If the URL doesn't end in /v1,
|
|
55
|
+
// the request goes to `${host}/messages` and 404s. Forge's defaultBaseUrl
|
|
56
|
+
// returns the host without /v1 to match the other SDK — normalize here.
|
|
57
|
+
const normalized = baseUrl
|
|
58
|
+
? baseUrl.replace(/\/+$/, '') + (/\/v\d+$/.test(baseUrl.replace(/\/+$/, '')) ? '' : '/v1')
|
|
59
|
+
: undefined;
|
|
53
60
|
return createAnthropic({
|
|
54
61
|
apiKey: oauth ? '' : apiKey,
|
|
55
|
-
baseURL:
|
|
62
|
+
baseURL: normalized,
|
|
56
63
|
headers: oauth
|
|
57
64
|
? {
|
|
58
65
|
authorization: `Bearer ${apiKey}`,
|
package/package.json
CHANGED