fix: enable encodeDefaults so message persistence actually works
kotlinx.serialization defaults to not encoding properties with default values. SaveMessage.kind = "chat" was never sent, causing the backend's sanitizeSaveableMessage() to reject every save with 400. This also broke title generation since it was gated behind a successful save.
This commit is contained in:
parent
9759d478a7
commit
203316b1c3
1 changed files with 1 additions and 1 deletions
|
|
@ -138,7 +138,7 @@ object KaizenApi {
|
||||||
.readTimeout(0, TimeUnit.SECONDS) // streaming chat — never time out a healthy stream
|
.readTimeout(0, TimeUnit.SECONDS) // streaming chat — never time out a healthy stream
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
private val json = Json { ignoreUnknownKeys = true }
|
private val json = Json { ignoreUnknownKeys = true; encodeDefaults = true }
|
||||||
private val jsonMedia = "application/json".toMediaType()
|
private val jsonMedia = "application/json".toMediaType()
|
||||||
|
|
||||||
/** POST /api/v1/auth/token — exchange email+password for a `kzn_` bearer token. */
|
/** POST /api/v1/auth/token — exchange email+password for a `kzn_` bearer token. */
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue