Commit df051e3
committed
fix: support kind field for skill priming and add storage_session_id to batch response
Two compatibility bugs in POST /upload/batch caused LibreChat skill priming
to fail completely.
Bug 1: storage_session_id missing from response
LibreChat's batchUploadCodeEnvFiles validates the response shape and throws
if storage_session_id is absent. The endpoint was returning session_id only.
Added storage_session_id as an alias (same value); session_id is kept for
backward compatibility.
Bug 2: kind=skill not recognized, .xsd files rejected
LibreChat's appendCodeEnvFileIdentity() sends kind/id/version fields — never
entity_id. The endpoint checked only entity_id to set is_agent_file, so all
39 .xsd schema files in skill bundles were rejected by the extension whitelist:
[primeSkillFiles] Partial upload failure for skill "pptx": 39 file(s) missing
Added recognition of kind=skill and kind=agent as agent-file uploads so skill
bundles bypass the user-facing extension whitelist and are tagged read-only.
The entity_id path is unchanged for backward compatibility.
Two integration tests added covering both fixes.1 parent df4ecc3 commit df051e3
2 files changed
Lines changed: 48 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
253 | 259 | | |
254 | 260 | | |
255 | 261 | | |
| |||
340 | 346 | | |
341 | 347 | | |
342 | 348 | | |
| 349 | + | |
343 | 350 | | |
344 | 351 | | |
345 | 352 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2038 | 2038 | | |
2039 | 2039 | | |
2040 | 2040 | | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
2041 | 2081 | | |
2042 | 2082 | | |
2043 | 2083 | | |
| |||
0 commit comments