You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# v0.8.7 — Localization, Bedrock Fixes & API Token Refresh
## Features
- **Hungarian, German, and Polish translations** — Three new languages added with full coverage of UI strings across the shell, session info popover, files section, rich text input, and island components. Polish includes proper plural form support.
- **API token refresh endpoint** — API-type sources can now specify an optional `renewEndpoint` for automatic token refresh without requiring full OAuth. Useful for APIs that issue short-lived tokens with a dedicated renewal mechanism.
## Improvements
- **Raw body support for API sources** — API source proxy now correctly handles `_rawBody` and `_contentType` parameters, enabling sources that need to send non-JSON payloads (e.g., form-encoded, XML).
## Bug Fixes
- **Bedrock model defaults and region awareness** — Corrected the default model list for Bedrock connections and added region-aware inference profile resolution, fixing issues where initial model selections failed with "model identifier is invalid" errors. Bare Claude model IDs without the required `us.` inference profile prefix are now filtered out automatically. (Fixes#536, partially addresses #528)
- **Model dropdown scrolling** — Dropdown sub-menus (e.g., model selector) are now scrollable when the list exceeds the viewport height. (Fixes#527)
- **Workspace file access** — Files under the workspace working directory can now be opened correctly, fixing "cannot open code file" errors. (Fixes#526)
- **Server lock released on quit** — The server lock file is now properly released when the app quits, with hardened stale lock detection to prevent "another instance running" false positives on crash recovery.
- **Stale reconnect session refresh** — Moved the stale reconnect session refresh into a transactional atom action, preventing race conditions that could cause message loss after sleep/wake reconnection.
## Breaking Changes
- None.
Copy file name to clipboardExpand all lines: apps/electron/resources/docs/sources.md
+69Lines changed: 69 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -400,6 +400,20 @@ With environment variables:
400
400
401
401
REST APIs become flexible tools that Claude can call.
402
402
403
+
**Request bodies:** By default, `params` is JSON-serialized for POST/PUT/PATCH requests. For endpoints that expect non-JSON bodies (plain text, XML, form data, etc.), use the special `_rawBody` and `_contentType` params:
404
+
405
+
```json
406
+
{
407
+
"params": {
408
+
"_rawBody": "raw string content to send as-is",
409
+
"_contentType": "text/plain"
410
+
}
411
+
}
412
+
```
413
+
414
+
-`_rawBody` (string) — sent as the request body without JSON encoding
415
+
-`_contentType` (string, optional) — sets the Content-Type header (defaults to `text/plain`)
416
+
403
417
**IMPORTANT:** Authenticated API sources require a `testEndpoint` to validate credentials during `source_test`. Without it, we cannot verify your credentials work.
404
418
405
419
**Header authentication (X-API-Key style):**
@@ -615,6 +629,61 @@ The `testEndpoint` specifies which endpoint to call when validating credentials:
615
629
616
630
**Public APIs (authType: 'none')** don't require testEndpoint - we test by hitting the base URL.
617
631
632
+
### renewEndpoint Configuration (Optional)
633
+
634
+
The optional `renewEndpoint` enables automatic token renewal for non-OAuth bearer-token APIs. When the token expires, the system calls this endpoint to get a fresh token — no manual re-authentication needed.
635
+
636
+
```json
637
+
{
638
+
"api": {
639
+
"baseUrl": "https://api.example.com/",
640
+
"authType": "bearer",
641
+
"renewEndpoint": {
642
+
"path": "auth/refresh",
643
+
"method": "POST",
644
+
"tokenField": "access_token",
645
+
"expiresInField": "expires_in"
646
+
}
647
+
}
648
+
}
649
+
```
650
+
651
+
**Fields:**
652
+
653
+
| Field | Required | Default | Description |
654
+
|-------|----------|---------|-------------|
655
+
|`path`| Yes | — | Renew URL — relative path (resolved against `baseUrl`) or absolute URL |
656
+
|`method`| No |`"POST"`| HTTP method: `"GET"` or `"POST"`|
657
+
|`body`| No | — | Request body (JSON). Use `{{token}}` as placeholder for the current access token |
658
+
|`headers`| No | — | Extra headers. Use `{{token}}` as placeholder. Merged on top of `defaultHeaders`|
659
+
|`tokenField`| No |`"access_token"`| JSON field name for the new token in the response |
660
+
|`expiresInField`| No |`"expires_in"`| JSON field name for expiry in seconds in the response |
661
+
|`fallbackTtlSecs`| No | — | Fallback TTL in seconds when the response doesn't include expiry info |
662
+
663
+
**How it works:**
664
+
1. Before each API request, the system checks if the token is expired or expiring soon (within 5 minutes)
665
+
2. If so, it calls the `renewEndpoint` with the current token in the Authorization header
666
+
3. The new token and expiry are extracted from the response and stored
667
+
4. The refreshed token is used for the API request
668
+
669
+
**Token substitution:** Use `{{token}}` in `body` or `headers` to insert the current access token. This supports nested objects — all string values are scanned recursively.
670
+
671
+
**Example with token in request body:**
672
+
```json
673
+
{
674
+
"renewEndpoint": {
675
+
"path": "auth/refresh",
676
+
"body": { "current_token": "{{token}}" },
677
+
"tokenField": "new_token",
678
+
"expiresInField": "ttl"
679
+
}
680
+
}
681
+
```
682
+
683
+
**When `body` is omitted**, the current token is sent via the standard Authorization header (using the source's `authScheme`).
684
+
685
+
**Note:** This is for APIs with their own token renewal mechanism, not OAuth. For OAuth-based APIs, use `authType: "oauth"` instead.
# v0.8.7 — Localization, Bedrock Fixes & API Token Refresh
2
+
3
+
## Features
4
+
-**Hungarian, German, and Polish translations** — Three new languages added with full coverage of UI strings across the shell, session info popover, files section, rich text input, and island components. Polish includes proper plural form support.
5
+
-**API token refresh endpoint** — API-type sources can now specify an optional `renewEndpoint` for automatic token refresh without requiring full OAuth. Useful for APIs that issue short-lived tokens with a dedicated renewal mechanism.
6
+
7
+
## Improvements
8
+
-**Raw body support for API sources** — API source proxy now correctly handles `_rawBody` and `_contentType` parameters, enabling sources that need to send non-JSON payloads (e.g., form-encoded, XML).
9
+
10
+
## Bug Fixes
11
+
-**Bedrock model defaults and region awareness** — Corrected the default model list for Bedrock connections and added region-aware inference profile resolution, fixing issues where initial model selections failed with "model identifier is invalid" errors. Bare Claude model IDs without the required `us.` inference profile prefix are now filtered out automatically. (Fixes #536, partially addresses #528)
12
+
-**Model dropdown scrolling** — Dropdown sub-menus (e.g., model selector) are now scrollable when the list exceeds the viewport height. (Fixes #527)
13
+
-**Workspace file access** — Files under the workspace working directory can now be opened correctly, fixing "cannot open code file" errors. (Fixes #526)
14
+
-**Server lock released on quit** — The server lock file is now properly released when the app quits, with hardened stale lock detection to prevent "another instance running" false positives on crash recovery.
15
+
-**Stale reconnect session refresh** — Moved the stale reconnect session refresh into a transactional atom action, preventing race conditions that could cause message loss after sleep/wake reconnection.
0 commit comments