lxfight
ea9e3421d9
fix: align knowledge base CRUD API contract with kb_name, canonical payload fields, and matching OpenAPI types (#9000)
Warning: Potential breaking changes in /kb related openapi.
* fix(kb): align CRUD API contract end-to-end
Unify knowledge base create/update/list with kb_name, canonical_payload,
optional list pagination with total, and matching OpenAPI plus dashboard types.
* fix: restore _model_dict references, add KnowledgeBaseCreateRequest, fix OpenAPI allOf validation
- Replace 3 remaining _model_dict() calls with payload.model_dump(exclude_none=True)
- Add KnowledgeBaseCreateRequest schema with required kb_name + embedding_provider_id
- Remove additionalProperties: false from OpenAPI allOf sub-schema to avoid validation failures
- Use Pydantic Field(alias="name") + populate_by_name=True for legacy name migration
- Delegate _canonical_kb_payload to KnowledgeBaseRequest to eliminate duplicated logic
- Add getattr default None for update_kb to prevent AttributeError
- Add validation error tests: missing kb_name, missing embedding_provider_id
* fix: address knowledge base contract follow-ups
* fix: preserve knowledge base create error shape
2026-07-03 22:18:56 +08:00
..
2026-03-22 21:49:43 +08:00
2026-06-14 15:03:26 +08:00
2026-07-03 00:40:20 +08:00
2026-06-20 01:15:31 +08:00
2026-03-27 15:54:41 +08:00
2026-07-03 21:54:20 +08:00
2026-06-14 15:03:26 +08:00
2026-06-15 13:41:13 +08:00
2026-06-17 00:32:37 +08:00
2026-04-29 11:05:38 +08:00
2026-06-28 00:03:31 +08:00
2026-06-18 23:35:33 +08:00
2026-06-17 22:25:51 +09:00
2026-06-14 15:03:26 +08:00
2026-06-07 10:50:33 +08:00
2026-04-14 16:27:06 +08:00
2026-05-28 08:20:11 +08:00
2026-07-03 01:05:25 +08:00
2026-06-14 15:03:26 +08:00
2026-07-02 11:53:45 +09:00
2026-07-03 22:13:23 +08:00
2026-04-08 00:33:39 +08:00
2026-07-03 22:18:56 +08:00
2026-06-14 15:03:26 +08:00
2026-04-20 13:30:04 +09:00
2026-06-27 16:57:17 +08:00
2026-04-21 11:31:26 +09:00
2026-06-14 15:03:26 +08:00
2026-06-07 10:51:27 +08:00
2026-07-03 21:54:20 +08:00
2026-06-14 15:03:26 +08:00
2026-04-18 19:57:27 +08:00
2026-06-27 16:06:14 +08:00
2026-06-13 17:34:11 +08:00
2026-03-17 15:42:15 +08:00
2026-06-14 15:03:26 +08:00
2026-03-21 10:44:48 +08:00
2026-06-25 16:18:04 +08:00
2026-06-01 16:40:29 +08:00
2026-06-14 15:03:26 +08:00
2026-06-24 15:53:47 +08:00
2026-06-26 11:27:32 +08:00