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-06-14 15:03:26 +08:00
2026-05-04 20:15:21 +08:00
2026-06-14 15:03:26 +08:00
2026-07-03 22:18:56 +08:00
2026-06-14 15:03:26 +08:00
2026-06-14 10:37:16 +08:00
2026-06-27 15:18:33 +08:00
2026-06-18 12:37:38 +08:00
2026-06-14 15:03:26 +08:00
2026-06-14 15:03:26 +08:00
2026-05-14 01:13:46 +08:00
2026-05-21 21:37:10 +08:00
2026-06-29 01:44:06 +08:00
2026-06-17 00:32:37 +08:00
2026-06-14 15:03:26 +08:00
2026-06-30 20:39:50 +08:00
2026-05-03 16:37:36 +08:00
2026-04-11 17:01:54 +08:00
2026-06-14 15:03:26 +08:00
2026-06-14 15:03:26 +08:00
2026-07-02 11:21:02 +09:00
2026-06-14 10:37:16 +08:00
2026-04-13 12:47:27 +09:00
2026-06-06 00:46:37 +08:00
2026-05-15 18:43:21 +08:00
2026-06-14 10:37:16 +08:00
2026-05-12 23:57:16 +08:00
2026-05-20 14:38:16 +08:00
2026-07-03 22:18:56 +08:00
2026-06-19 17:13:40 +08:00
2026-06-19 17:41:13 +08:00
2026-06-28 14:00:45 +08:00
2026-05-15 13:00:26 +08:00
2026-04-11 17:01:54 +08:00
2026-06-27 00:10:59 +08:00
2026-06-20 00:01:29 +08:00
2026-06-14 10:37:16 +08:00
2026-07-01 22:33:36 +08:00
2026-06-27 15:04:41 +08:00
2026-04-11 17:01:54 +08:00
2026-06-13 15:57:36 +08:00
2026-06-27 16:27:32 +08:00
2026-04-10 17:08:10 +09:00
2026-04-28 21:10:19 +09:00
2026-06-14 10:37:16 +08:00
2026-06-26 11:27:32 +08:00
2026-07-03 00:34:37 +08:00
2026-06-26 11:27:32 +08:00
2026-06-14 15:03:26 +08:00
2026-06-17 21:13:05 +08:00
2026-06-17 21:13:05 +08:00
2026-07-03 00:25:09 +08:00
2026-06-14 10:37:16 +08:00
2026-06-19 17:13:40 +08:00
2026-06-14 15:03:26 +08:00
2026-06-14 15:03:26 +08:00
2026-06-19 12:03:07 +08:00
2026-06-14 10:37:16 +08:00
2026-06-20 22:06:24 +08:00
2026-06-02 08:53:59 +08:00
2026-06-05 19:09:48 +08:00
2026-07-02 11:33:47 +09:00
2026-07-03 00:25:09 +08:00
2026-05-15 13:00:26 +08:00
2026-06-14 10:37:16 +08:00