kefuxin
b6a3ab11e0
fix: improve Gemini compatibility by adding configurable schema converter
...
This commit addresses issue #1186 by introducing a configurable schema compliance
mechanism for tool definitions sent to LLMs.
Key changes:
1. **New Configuration**: Added `model.generationConfig.schemaCompliance` setting (defaults to 'auto', optional 'openapi_30').
2. **Schema Converter**: Implemented `toOpenAPI30` converter in `packages/core` to strictly downgrade modern JSON Schema to OpenAPI 3.0.3 (required for Gemini API), handling:
- Nullable types (`["string", "null"]` -> `nullable: true`)
- Numeric exclusive limits
- Const to Enum conversion
- Removal of tuples and invalid keywords (``, `dependencies`, etc.)
3. **Tests**: Added comprehensive unit tests for the schema converter and updated pipeline tests.
Fixes #1186
2025-12-11 14:23:27 +08:00
..
2025-10-23 09:27:04 +08:00
2025-09-18 13:32:00 +08:00
2025-10-23 09:27:04 +08:00
2025-10-23 09:27:04 +08:00
2025-09-01 14:48:55 +08:00
2025-11-13 19:01:09 +08:00
2025-11-13 19:01:09 +08:00
2025-11-17 10:58:33 +08:00
2025-11-17 10:58:33 +08:00
2025-11-07 17:28:16 +08:00
2025-11-07 17:28:16 +08:00
2025-10-23 09:27:04 +08:00
2025-10-23 09:27:04 +08:00
2025-10-23 09:27:04 +08:00
2025-10-23 09:27:04 +08:00
2025-10-23 09:27:04 +08:00
2025-08-25 20:11:27 +00:00
2025-11-07 17:28:16 +08:00
2025-11-07 17:28:16 +08:00
2025-12-03 18:04:48 +08:00
2025-08-28 03:22:21 +00:00
2025-08-28 03:22:21 +00:00
2025-10-23 09:27:04 +08:00
2025-10-23 09:27:04 +08:00
2025-09-01 14:48:55 +08:00
2025-10-23 09:27:04 +08:00
2025-10-23 09:27:04 +08:00
2025-12-03 18:04:48 +08:00
2025-08-25 22:04:53 +00:00
2025-08-25 22:04:53 +00:00
2025-09-11 16:26:56 +08:00
2025-08-25 20:11:27 +00:00
2025-12-03 18:04:48 +08:00
2025-08-25 20:11:27 +00:00
2025-10-23 09:27:04 +08:00
2025-10-23 09:27:04 +08:00
2025-10-23 09:27:04 +08:00
2025-10-23 09:27:04 +08:00
2025-10-23 09:27:04 +08:00
2025-10-23 09:27:04 +08:00
2025-08-25 22:04:53 +00:00
2025-12-03 18:04:48 +08:00
2025-10-23 09:27:04 +08:00
2025-11-05 18:49:04 +08:00
2025-11-05 18:49:04 +08:00
2025-08-28 03:22:21 +00:00
2025-08-28 03:22:21 +00:00
2025-11-07 17:28:16 +08:00
2025-11-07 17:28:16 +08:00
2025-11-06 16:25:06 +08:00
2025-12-03 18:04:48 +08:00
2025-09-11 16:59:26 +08:00
2025-10-23 09:27:04 +08:00
2025-08-08 10:30:18 +08:00
2025-09-11 16:26:56 +08:00
2025-10-23 09:27:04 +08:00
2025-10-23 09:27:04 +08:00
2025-10-23 09:27:04 +08:00
2025-10-23 09:27:04 +08:00
2025-11-20 15:04:00 +08:00
2025-11-20 15:04:00 +08:00
2025-08-14 21:18:26 +08:00
2025-08-14 21:18:26 +08:00
2025-12-11 14:23:27 +08:00
2025-12-11 14:23:27 +08:00
2025-10-23 09:27:04 +08:00
2025-10-23 09:27:04 +08:00
2025-08-01 05:47:22 +00:00
2025-09-01 14:48:55 +08:00
2025-10-23 09:27:04 +08:00
2025-12-02 11:49:40 +08:00
2025-09-24 14:26:17 +08:00
2025-09-24 14:26:17 +08:00
2025-10-23 09:27:04 +08:00
2025-10-23 09:27:04 +08:00
2025-08-25 22:04:53 +00:00
2025-08-25 22:04:53 +00:00
2025-12-05 16:49:26 +08:00
2025-12-05 16:49:26 +08:00
2025-10-23 09:27:04 +08:00
2025-10-23 09:27:04 +08:00
2025-10-23 09:27:04 +08:00
2025-10-23 09:27:04 +08:00
2025-10-23 09:27:04 +08:00
2025-12-05 15:08:35 +08:00
2025-11-12 19:46:05 +08:00
2025-11-12 19:46:05 +08:00
2025-09-11 16:26:56 +08:00
2025-08-20 01:55:47 +00:00
2025-09-01 14:48:55 +08:00
2025-09-01 14:48:55 +08:00
2025-09-10 16:24:59 +08:00
2025-09-10 16:24:59 +08:00