@jsonstudio/llms 0.6.2979 → 0.6.3238
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/conversion/args-mapping.js +8 -0
- package/dist/conversion/{shared/bridge-actions.js → bridge-actions.js} +2 -1
- package/dist/conversion/{shared/bridge-id-utils.js → bridge-id-utils.js} +1 -1
- package/dist/conversion/{shared/bridge-instructions.js → bridge-instructions.js} +1 -1
- package/dist/conversion/{shared/bridge-message-utils.d.ts → bridge-message-utils.d.ts} +1 -1
- package/dist/conversion/{shared/bridge-message-utils.js → bridge-message-utils.js} +5 -149
- package/dist/conversion/{shared/bridge-metadata.js → bridge-metadata.js} +1 -1
- package/dist/conversion/{shared/bridge-policies.js → bridge-policies.js} +1 -1
- package/dist/conversion/codecs/gemini-openai-codec.js +27 -8
- package/dist/conversion/codecs/responses-openai-codec.js +1 -1
- package/dist/conversion/{shared/compaction-detect.d.ts → compaction-detect.d.ts} +1 -1
- package/dist/conversion/compaction-detect.js +4 -0
- package/dist/conversion/compat/actions/apply-patch-fixer.js +2 -2
- package/dist/conversion/compat/actions/deepseek-web-response.d.ts +0 -1
- package/dist/conversion/compat/actions/deepseek-web-response.js +15 -405
- package/dist/conversion/compat/actions/harvest-tool-calls-from-text.js +1 -1
- package/dist/conversion/compat/actions/lmstudio-responses-fc-ids.js +1 -1
- package/dist/conversion/compat/actions/qwen-transform.js +74 -2
- package/dist/conversion/compat/actions/snapshot.js +1 -1
- package/dist/conversion/compat/antigravity-session-signature.js +36 -0
- package/dist/conversion/compat/profiles/chat-deepseek-web.json +0 -22
- package/dist/conversion/compat/profiles/chat-glm.json +251 -72
- package/dist/conversion/compat/profiles/chat-iflow.json +174 -39
- package/dist/conversion/compat/profiles/chat-lmstudio.json +43 -14
- package/dist/conversion/hub/operation-table/operation-table-runner.js +2 -2
- package/dist/conversion/hub/operation-table/semantic-mappers/anthropic-mapper.js +1 -1
- package/dist/conversion/hub/operation-table/semantic-mappers/archive/chat-mapper.archive.d.ts +8 -0
- package/dist/conversion/hub/operation-table/semantic-mappers/archive/chat-mapper.archive.js +404 -0
- package/dist/conversion/hub/operation-table/semantic-mappers/chat-mapper.js +5 -381
- package/dist/conversion/hub/operation-table/semantic-mappers/gemini-mapper.js +2 -2
- package/dist/conversion/hub/operation-table/semantic-mappers/responses-mapper.js +2 -8
- package/dist/conversion/hub/pipeline/hub-pipeline.d.ts +1 -0
- package/dist/conversion/hub/pipeline/hub-pipeline.js +50 -3
- package/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage2_semantic_map/index.d.ts +1 -1
- package/dist/conversion/hub/pipeline/stages/req_inbound/req_inbound_stage2_semantic_map/index.js +62 -0
- package/dist/conversion/hub/pipeline/stages/req_process/req_process_stage2_route_select/index.js +3 -1
- package/dist/conversion/hub/pipeline/stages/resp_inbound/resp_inbound_stage1_sse_decode/index.js +1 -1
- package/dist/conversion/hub/pipeline/stages/resp_outbound/resp_outbound_stage1_client_remap/chat-process-semantics-bridge.d.ts +1 -1
- package/dist/conversion/hub/pipeline/stages/resp_process/resp_process_stage1_tool_governance/index.js +42 -29
- package/dist/conversion/hub/pipeline/stages/resp_process/resp_process_stage2_finalize/index.js +12 -0
- package/dist/conversion/hub/policy/protocol-spec.js +1 -1
- package/dist/conversion/hub/process/chat-process-clock-reminders.js +1 -1
- package/dist/conversion/hub/process/chat-process-clock-tools.js +1 -1
- package/dist/conversion/hub/process/chat-process-continue-execution.js +1 -1
- package/dist/conversion/hub/process/chat-process-servertool-orchestration.js +1 -1
- package/dist/conversion/hub/process/chat-process-web-search.js +1 -1
- package/dist/conversion/hub/response/provider-response.js +14 -5
- package/dist/conversion/hub/response/response-mappers.js +23 -1
- package/dist/conversion/hub/response/response-runtime.js +28 -5
- package/dist/conversion/hub/snapshot-recorder.js +3 -92
- package/dist/conversion/hub/tool-governance/engine.d.ts +8 -0
- package/dist/conversion/hub/tool-governance/engine.js +40 -193
- package/dist/conversion/hub/tool-governance/rules.js +73 -69
- package/dist/conversion/hub/tool-surface/tool-surface-engine.js +1 -1
- package/dist/conversion/index.d.ts +1 -2
- package/dist/conversion/index.js +1 -2
- package/dist/conversion/{shared/jsonish.js → jsonish.js} +1 -1
- package/dist/conversion/{shared/mcp-injection.js → mcp-injection.js} +1 -1
- package/dist/conversion/media.js +4 -0
- package/dist/conversion/{shared/metadata-passthrough.d.ts → metadata-passthrough.d.ts} +1 -1
- package/dist/conversion/{shared/metadata-passthrough.js → metadata-passthrough.js} +2 -2
- package/dist/conversion/payload-budget.js +47 -0
- package/dist/conversion/protocol-field-allowlists.d.ts +7 -0
- package/dist/conversion/protocol-field-allowlists.js +9 -0
- package/dist/conversion/{shared/protocol-state.d.ts → protocol-state.d.ts} +2 -2
- package/dist/conversion/{shared/protocol-state.js → protocol-state.js} +2 -2
- package/dist/conversion/{shared/errors.d.ts → provider-protocol-error.d.ts} +0 -3
- package/dist/conversion/provider-protocol-error.js +25 -0
- package/dist/conversion/responses/responses-openai-bridge/response-payload.js +8 -5
- package/dist/conversion/responses/responses-openai-bridge/types.d.ts +1 -1
- package/dist/conversion/responses/responses-openai-bridge.d.ts +1 -1
- package/dist/conversion/responses/responses-openai-bridge.js +43 -10
- package/dist/conversion/{shared/runtime-metadata.d.ts → runtime-metadata.d.ts} +1 -1
- package/dist/conversion/{shared/runtime-metadata.js → runtime-metadata.js} +2 -2
- package/dist/conversion/shared/anthropic-message-utils.js +19 -8
- package/dist/conversion/shared/chat-request-filters.d.ts +3 -4
- package/dist/conversion/shared/chat-request-filters.js +22 -78
- package/dist/conversion/shared/gemini-tool-utils.d.ts +1 -1
- package/dist/conversion/shared/openai-finalizer.js +1 -0
- package/dist/conversion/shared/openai-message-normalize.js +2 -2
- package/dist/conversion/shared/reasoning-normalizer.js +6 -0
- package/dist/conversion/shared/reasoning-utils.js +5 -2
- package/dist/conversion/shared/responses-conversation-store.js +1 -1
- package/dist/conversion/shared/responses-output-builder.js +55 -11
- package/dist/conversion/shared/responses-reasoning-registry.d.ts +14 -2
- package/dist/conversion/shared/responses-reasoning-registry.js +34 -6
- package/dist/conversion/shared/responses-response-utils.js +99 -9
- package/dist/conversion/shared/responses-tool-utils.js +1 -1
- package/dist/conversion/shared/text-markup-normalizer/normalize.d.ts +1 -1
- package/dist/conversion/shared/text-markup-normalizer.d.ts +2 -2
- package/dist/conversion/shared/text-markup-normalizer.js +1 -1
- package/dist/conversion/shared/tool-filter-pipeline.js +1 -1
- package/dist/conversion/shared/tool-governor.js +3 -3
- package/dist/conversion/shared/tool-mapping.d.ts +1 -1
- package/dist/conversion/{shared/snapshot-utils.d.ts → snapshot-utils.d.ts} +11 -0
- package/dist/conversion/{shared/snapshot-utils.js → snapshot-utils.js} +14 -23
- package/dist/conversion/types/text-markup-normalizer.d.ts +13 -0
- package/dist/conversion/types/text-markup-normalizer.js +1 -0
- package/dist/filters/special/request-tools-normalize.js +1 -1
- package/dist/filters/special/response-tool-text-canonicalize.js +2 -2
- package/dist/native/router_hotpath_napi.node +0 -0
- package/dist/quota/quota-manager.js +31 -59
- package/dist/quota/quota-state.js +14 -7
- package/dist/router/virtual-router/bootstrap/profile-builder.d.ts +1 -0
- package/dist/router/virtual-router/bootstrap/profile-builder.js +13 -0
- package/dist/router/virtual-router/bootstrap/provider-normalization.d.ts +2 -0
- package/dist/router/virtual-router/bootstrap/provider-normalization.js +4 -1
- package/dist/router/virtual-router/bootstrap/streaming-helpers.d.ts +7 -0
- package/dist/router/virtual-router/bootstrap/streaming-helpers.js +44 -0
- package/dist/router/virtual-router/bootstrap.js +2 -0
- package/dist/router/virtual-router/engine/routing-state/store.d.ts +1 -2
- package/dist/router/virtual-router/engine/routing-state/store.js +2 -2
- package/dist/router/virtual-router/engine-legacy/config.d.ts +11 -0
- package/dist/router/virtual-router/engine-legacy/config.js +108 -0
- package/dist/router/virtual-router/engine-legacy/direct-model.d.ts +10 -0
- package/dist/router/virtual-router/engine-legacy/direct-model.js +38 -0
- package/dist/router/virtual-router/engine-legacy/health.d.ts +13 -0
- package/dist/router/virtual-router/engine-legacy/health.js +104 -0
- package/dist/router/virtual-router/engine-legacy/helpers.d.ts +16 -0
- package/dist/router/virtual-router/engine-legacy/helpers.js +226 -0
- package/dist/router/virtual-router/engine-legacy/route-finalize.d.ts +9 -0
- package/dist/router/virtual-router/engine-legacy/route-finalize.js +84 -0
- package/dist/router/virtual-router/engine-legacy/route-selection.d.ts +17 -0
- package/dist/router/virtual-router/engine-legacy/route-selection.js +205 -0
- package/dist/router/virtual-router/engine-legacy/route-state-allowlist.d.ts +3 -0
- package/dist/router/virtual-router/engine-legacy/route-state-allowlist.js +36 -0
- package/dist/router/virtual-router/engine-legacy/route-state.d.ts +12 -0
- package/dist/router/virtual-router/engine-legacy/route-state.js +386 -0
- package/dist/router/virtual-router/engine-legacy/route-utils.d.ts +19 -0
- package/dist/router/virtual-router/engine-legacy/route-utils.js +212 -0
- package/dist/router/virtual-router/engine-legacy/routing.d.ts +8 -0
- package/dist/router/virtual-router/engine-legacy/routing.js +8 -0
- package/dist/router/virtual-router/engine-legacy/selection-core.d.ts +28 -0
- package/dist/router/virtual-router/engine-legacy/selection-core.js +112 -0
- package/dist/router/virtual-router/engine-legacy/selection-state.d.ts +16 -0
- package/dist/router/virtual-router/engine-legacy/selection-state.js +187 -0
- package/dist/router/virtual-router/engine-legacy/state-accessors.d.ts +21 -0
- package/dist/router/virtual-router/engine-legacy/state-accessors.js +118 -0
- package/dist/router/virtual-router/engine-legacy.d.ts +123 -0
- package/dist/router/virtual-router/engine-legacy.js +194 -0
- package/dist/router/virtual-router/engine-logging.d.ts +2 -0
- package/dist/router/virtual-router/engine-logging.js +7 -2
- package/dist/router/virtual-router/engine-selection/key-parsing.js +0 -3
- package/dist/router/virtual-router/engine-selection/native-chat-request-filter-semantics.d.ts +1 -0
- package/dist/router/virtual-router/engine-selection/native-chat-request-filter-semantics.js +54 -0
- package/dist/router/virtual-router/engine-selection/native-hub-bridge-policy-semantics.d.ts +10 -0
- package/dist/router/virtual-router/engine-selection/native-hub-bridge-policy-semantics.js +67 -0
- package/dist/router/virtual-router/engine-selection/native-hub-pipeline-governance-semantics.d.ts +30 -0
- package/dist/router/virtual-router/engine-selection/native-hub-pipeline-governance-semantics.js +202 -0
- package/dist/router/virtual-router/engine-selection/native-hub-pipeline-semantic-mappers.d.ts +2 -0
- package/dist/router/virtual-router/engine-selection/native-hub-pipeline-semantic-mappers.js +83 -0
- package/dist/router/virtual-router/engine-selection/native-router-hotpath-loader.js +43 -2
- package/dist/router/virtual-router/engine-selection/native-shared-conversion-semantics.d.ts +75 -0
- package/dist/router/virtual-router/engine-selection/native-shared-conversion-semantics.js +205 -0
- package/dist/router/virtual-router/engine-selection/native-snapshot-hooks.d.ts +3 -0
- package/dist/router/virtual-router/engine-selection/native-snapshot-hooks.js +109 -0
- package/dist/router/virtual-router/engine-selection/native-virtual-router-engine-proxy.d.ts +16 -0
- package/dist/router/virtual-router/engine-selection/native-virtual-router-engine-proxy.js +14 -0
- package/dist/router/virtual-router/engine-selection/native-virtual-router-routing-instructions-semantics.d.ts +2 -0
- package/dist/router/virtual-router/engine-selection/native-virtual-router-routing-instructions-semantics.js +86 -0
- package/dist/router/virtual-router/engine-selection/tier-selection-quota-integration.js +100 -0
- package/dist/router/virtual-router/engine-selection/tier-selection-select.js +99 -0
- package/dist/router/virtual-router/engine.d.ts +22 -105
- package/dist/router/virtual-router/engine.js +274 -1641
- package/dist/router/virtual-router/load-balancer.d.ts +8 -0
- package/dist/router/virtual-router/load-balancer.js +65 -2
- package/dist/router/virtual-router/provider-registry.js +2 -0
- package/dist/router/virtual-router/routing-instructions/clean.d.ts +3 -0
- package/dist/router/virtual-router/routing-instructions/clean.js +34 -0
- package/dist/router/virtual-router/routing-instructions/parse.d.ts +18 -0
- package/dist/router/virtual-router/routing-instructions/parse.js +377 -0
- package/dist/router/virtual-router/routing-instructions/state.d.ts +4 -0
- package/dist/router/virtual-router/routing-instructions/state.js +245 -0
- package/dist/router/virtual-router/routing-instructions/types.d.ts +70 -0
- package/dist/router/virtual-router/routing-instructions/types.js +2 -0
- package/dist/router/virtual-router/routing-instructions.d.ts +5 -89
- package/dist/router/virtual-router/routing-instructions.js +4 -655
- package/dist/router/virtual-router/sticky-session-store.d.ts +4 -0
- package/dist/router/virtual-router/sticky-session-store.js +19 -81
- package/dist/router/virtual-router/tool-signals.js +21 -3
- package/dist/router/virtual-router/types.d.ts +4 -0
- package/dist/servertool/clock/session-scope.js +32 -1
- package/dist/servertool/engine.js +79 -8
- package/dist/servertool/handlers/antigravity-thought-signature-bootstrap.js +1 -1
- package/dist/servertool/handlers/clock-auto.js +1 -1
- package/dist/servertool/handlers/clock.js +1 -1
- package/dist/servertool/handlers/compaction-detect.d.ts +1 -1
- package/dist/servertool/handlers/compaction-detect.js +1 -1
- package/dist/servertool/handlers/gemini-empty-reply-continue.js +1 -1
- package/dist/servertool/handlers/iflow-model-error-retry.js +1 -1
- package/dist/servertool/handlers/recursive-detection-guard.js +1 -1
- package/dist/servertool/handlers/review.js +1 -1
- package/dist/servertool/handlers/stop-message-auto/iflow-followup.js +1 -1
- package/dist/servertool/handlers/stop-message-auto/runtime-utils.js +1 -1
- package/dist/servertool/handlers/stop-message-auto.js +1 -1
- package/dist/servertool/handlers/vision.js +1 -1
- package/dist/servertool/handlers/web-search.js +1 -1
- package/dist/servertool/reenter-backend.js +1 -1
- package/dist/servertool/server-side-tools.js +2 -2
- package/dist/servertool/stop-gateway-context.js +1 -1
- package/dist/servertool/stop-message-compare-context.js +1 -1
- package/dist/sse/json-to-sse/event-generators/responses.d.ts +4 -0
- package/dist/sse/json-to-sse/event-generators/responses.js +95 -1
- package/dist/sse/json-to-sse/sequencers/responses-sequencer.js +6 -4
- package/dist/sse/sse-to-json/builders/response-builder.d.ts +8 -0
- package/dist/sse/sse-to-json/builders/response-builder.js +162 -4
- package/dist/sse/sse-to-json/responses-sse-to-json-converter.js +2 -0
- package/dist/sse/types/responses-types.d.ts +6 -2
- package/dist/tools/apply-patch/structured/coercion.js +5 -0
- package/dist/tools/args-json.js +29 -0
- package/package.json +8 -5
- package/dist/conversion/shared/args-mapping.js +0 -77
- package/dist/conversion/shared/compaction-detect.js +0 -4
- package/dist/conversion/shared/errors.js +0 -31
- package/dist/conversion/shared/media.js +0 -4
- package/dist/conversion/shared/payload-budget.js +0 -165
- package/dist/conversion/shared/protocol-field-allowlists.d.ts +0 -7
- package/dist/conversion/shared/protocol-field-allowlists.js +0 -149
- package/dist/conversion/shared/snapshot-hooks.d.ts +0 -11
- package/dist/conversion/shared/snapshot-hooks.js +0 -503
- package/dist/conversion/shared/text-markup-normalizer/extractors-apply-patch.d.ts +0 -2
- package/dist/conversion/shared/text-markup-normalizer/extractors-apply-patch.js +0 -129
- package/dist/conversion/shared/text-markup-normalizer/extractors-json.d.ts +0 -4
- package/dist/conversion/shared/text-markup-normalizer/extractors-json.js +0 -637
- package/dist/conversion/shared/text-markup-normalizer/extractors-shared.d.ts +0 -21
- package/dist/conversion/shared/text-markup-normalizer/extractors-shared.js +0 -177
- package/dist/conversion/shared/text-markup-normalizer/extractors-transcript.d.ts +0 -5
- package/dist/conversion/shared/text-markup-normalizer/extractors-transcript.js +0 -385
- package/dist/conversion/shared/text-markup-normalizer/extractors-xml.d.ts +0 -10
- package/dist/conversion/shared/text-markup-normalizer/extractors-xml.js +0 -602
- package/dist/conversion/shared/text-markup-normalizer/extractors.d.ts +0 -5
- package/dist/conversion/shared/text-markup-normalizer/extractors.js +0 -4
- package/dist/conversion/shared/tool-canonicalizer.d.ts +0 -2
- package/dist/conversion/shared/tool-canonicalizer.js +0 -38
- /package/dist/conversion/{shared/args-mapping.d.ts → args-mapping.d.ts} +0 -0
- /package/dist/conversion/{shared/bridge-actions.d.ts → bridge-actions.d.ts} +0 -0
- /package/dist/conversion/{shared/bridge-id-utils.d.ts → bridge-id-utils.d.ts} +0 -0
- /package/dist/conversion/{shared/bridge-instructions.d.ts → bridge-instructions.d.ts} +0 -0
- /package/dist/conversion/{shared/bridge-metadata.d.ts → bridge-metadata.d.ts} +0 -0
- /package/dist/conversion/{shared/bridge-policies.d.ts → bridge-policies.d.ts} +0 -0
- /package/dist/conversion/{shared/jsonish.d.ts → jsonish.d.ts} +0 -0
- /package/dist/conversion/{shared/mcp-injection.d.ts → mcp-injection.d.ts} +0 -0
- /package/dist/conversion/{shared/media.d.ts → media.d.ts} +0 -0
- /package/dist/conversion/{shared/payload-budget.d.ts → payload-budget.d.ts} +0 -0
- /package/dist/conversion/{shared → types}/bridge-message-types.d.ts +0 -0
- /package/dist/conversion/{shared → types}/bridge-message-types.js +0 -0
|
@@ -41,28 +41,6 @@
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
|
-
{
|
|
45
|
-
"action": "harvest_tool_calls_from_text",
|
|
46
|
-
"config": {
|
|
47
|
-
"normalizer": {
|
|
48
|
-
"jsonToolRepair": {
|
|
49
|
-
"toolNameAliases": {
|
|
50
|
-
"shell_command": "exec_command",
|
|
51
|
-
"shell": "exec_command",
|
|
52
|
-
"bash": "exec_command",
|
|
53
|
-
"terminal": "exec_command"
|
|
54
|
-
},
|
|
55
|
-
"argumentAliases": {
|
|
56
|
-
"exec_command": {
|
|
57
|
-
"cmd": ["cmd", "command", "input.command", "script"],
|
|
58
|
-
"command": ["cmd", "command", "input.command", "script"],
|
|
59
|
-
"workdir": ["workdir", "cwd", "input.cwd"]
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
44
|
{ "action": "snapshot", "phase": "compat-post" }
|
|
67
45
|
]
|
|
68
46
|
}
|
|
@@ -3,8 +3,13 @@
|
|
|
3
3
|
"protocol": "openai-chat",
|
|
4
4
|
"request": {
|
|
5
5
|
"mappings": [
|
|
6
|
-
{
|
|
7
|
-
|
|
6
|
+
{
|
|
7
|
+
"action": "snapshot",
|
|
8
|
+
"phase": "compat-pre"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"action": "dto_unwrap"
|
|
12
|
+
},
|
|
8
13
|
{
|
|
9
14
|
"action": "remove",
|
|
10
15
|
"path": "parallel_tool_calls"
|
|
@@ -30,11 +35,27 @@
|
|
|
30
35
|
"config": {
|
|
31
36
|
"request": {
|
|
32
37
|
"allowTopLevel": [
|
|
33
|
-
"model",
|
|
34
|
-
"
|
|
38
|
+
"model",
|
|
39
|
+
"messages",
|
|
40
|
+
"stream",
|
|
41
|
+
"thinking",
|
|
42
|
+
"do_sample",
|
|
43
|
+
"temperature",
|
|
44
|
+
"top_p",
|
|
45
|
+
"max_tokens",
|
|
46
|
+
"tools",
|
|
47
|
+
"tool_choice",
|
|
48
|
+
"stop",
|
|
49
|
+
"response_format",
|
|
50
|
+
"web_search"
|
|
35
51
|
],
|
|
36
52
|
"messages": {
|
|
37
|
-
"allowedRoles": [
|
|
53
|
+
"allowedRoles": [
|
|
54
|
+
"system",
|
|
55
|
+
"user",
|
|
56
|
+
"assistant",
|
|
57
|
+
"tool"
|
|
58
|
+
],
|
|
38
59
|
"assistantWithToolCallsContentNull": true,
|
|
39
60
|
"toolContentStringify": false
|
|
40
61
|
},
|
|
@@ -43,25 +64,61 @@
|
|
|
43
64
|
"normalize": false,
|
|
44
65
|
"forceToolChoiceAuto": true
|
|
45
66
|
},
|
|
46
|
-
"assistantToolCalls": {
|
|
67
|
+
"assistantToolCalls": {
|
|
68
|
+
"functionArgumentsType": "string"
|
|
69
|
+
}
|
|
47
70
|
},
|
|
48
71
|
"response": {
|
|
49
72
|
"allowTopLevel": [
|
|
50
|
-
"id",
|
|
51
|
-
"
|
|
52
|
-
"
|
|
73
|
+
"id",
|
|
74
|
+
"request_id",
|
|
75
|
+
"created",
|
|
76
|
+
"model",
|
|
77
|
+
"choices",
|
|
78
|
+
"usage",
|
|
79
|
+
"video_result",
|
|
80
|
+
"web_search",
|
|
81
|
+
"content_filter",
|
|
82
|
+
"required_action",
|
|
83
|
+
"output",
|
|
84
|
+
"output_text",
|
|
85
|
+
"status"
|
|
53
86
|
],
|
|
54
87
|
"choices": {
|
|
55
88
|
"required": true,
|
|
56
89
|
"message": {
|
|
57
|
-
"allow": [
|
|
90
|
+
"allow": [
|
|
91
|
+
"role",
|
|
92
|
+
"content",
|
|
93
|
+
"reasoning_content",
|
|
94
|
+
"audio",
|
|
95
|
+
"tool_calls"
|
|
96
|
+
],
|
|
58
97
|
"roleDefault": "assistant",
|
|
59
98
|
"contentNullWhenToolCalls": true,
|
|
60
|
-
"tool_calls": {
|
|
99
|
+
"tool_calls": {
|
|
100
|
+
"function": {
|
|
101
|
+
"nameRequired": true,
|
|
102
|
+
"argumentsType": "string"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
61
105
|
},
|
|
62
|
-
"finish_reason": [
|
|
106
|
+
"finish_reason": [
|
|
107
|
+
"stop",
|
|
108
|
+
"tool_calls",
|
|
109
|
+
"length",
|
|
110
|
+
"sensitive",
|
|
111
|
+
"network_error"
|
|
112
|
+
]
|
|
63
113
|
},
|
|
64
|
-
"usage": {
|
|
114
|
+
"usage": {
|
|
115
|
+
"allow": [
|
|
116
|
+
"prompt_tokens",
|
|
117
|
+
"completion_tokens",
|
|
118
|
+
"prompt_tokens_details",
|
|
119
|
+
"total_tokens"
|
|
120
|
+
]
|
|
121
|
+
}
|
|
65
122
|
}
|
|
66
123
|
}
|
|
67
124
|
},
|
|
@@ -70,19 +127,31 @@
|
|
|
70
127
|
"config": {
|
|
71
128
|
"tools": {
|
|
72
129
|
"function": {
|
|
73
|
-
"removeKeys": [
|
|
130
|
+
"removeKeys": [
|
|
131
|
+
"strict",
|
|
132
|
+
"json_schema"
|
|
133
|
+
]
|
|
74
134
|
}
|
|
75
135
|
},
|
|
76
136
|
"messages": {
|
|
77
137
|
"assistantToolCalls": {
|
|
78
138
|
"function": {
|
|
79
|
-
"removeKeys": [
|
|
139
|
+
"removeKeys": [
|
|
140
|
+
"strict"
|
|
141
|
+
]
|
|
80
142
|
}
|
|
81
143
|
}
|
|
82
144
|
},
|
|
83
145
|
"topLevel": {
|
|
84
146
|
"conditional": [
|
|
85
|
-
{
|
|
147
|
+
{
|
|
148
|
+
"when": {
|
|
149
|
+
"tools": "empty"
|
|
150
|
+
},
|
|
151
|
+
"remove": [
|
|
152
|
+
"tool_choice"
|
|
153
|
+
]
|
|
154
|
+
}
|
|
86
155
|
]
|
|
87
156
|
}
|
|
88
157
|
}
|
|
@@ -91,11 +160,32 @@
|
|
|
91
160
|
"action": "field_map",
|
|
92
161
|
"direction": "incoming",
|
|
93
162
|
"config": [
|
|
94
|
-
{
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
163
|
+
{
|
|
164
|
+
"sourcePath": "usage.prompt_tokens",
|
|
165
|
+
"targetPath": "usage.input_tokens",
|
|
166
|
+
"type": "number"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"sourcePath": "usage.completion_tokens",
|
|
170
|
+
"targetPath": "usage.output_tokens",
|
|
171
|
+
"type": "number"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"sourcePath": "created",
|
|
175
|
+
"targetPath": "created_at",
|
|
176
|
+
"type": "number"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"sourcePath": "request_id",
|
|
180
|
+
"targetPath": "request_id",
|
|
181
|
+
"type": "string"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"sourcePath": "model",
|
|
185
|
+
"targetPath": "model",
|
|
186
|
+
"type": "string",
|
|
187
|
+
"transform": "normalizeModelName"
|
|
188
|
+
},
|
|
99
189
|
{
|
|
100
190
|
"sourcePath": "choices[*].message.tool_calls[*].function.arguments",
|
|
101
191
|
"targetPath": "choices[*].message.tool_calls[*].function.arguments",
|
|
@@ -103,29 +193,51 @@
|
|
|
103
193
|
}
|
|
104
194
|
]
|
|
105
195
|
},
|
|
106
|
-
{
|
|
196
|
+
{
|
|
197
|
+
"action": "tool_schema_sanitize",
|
|
198
|
+
"mode": "glm_shell"
|
|
199
|
+
},
|
|
107
200
|
{
|
|
108
201
|
"action": "glm_web_search_request"
|
|
109
202
|
},
|
|
110
203
|
{
|
|
111
204
|
"action": "auto_thinking",
|
|
112
205
|
"config": {
|
|
113
|
-
"modelPrefixes": [
|
|
114
|
-
|
|
206
|
+
"modelPrefixes": [
|
|
207
|
+
"glm-4.7",
|
|
208
|
+
"glm-4.6",
|
|
209
|
+
"glm-4.5",
|
|
210
|
+
"glm-z1"
|
|
211
|
+
],
|
|
212
|
+
"excludePrefixes": [
|
|
213
|
+
"glm-4.6v"
|
|
214
|
+
]
|
|
115
215
|
}
|
|
116
216
|
},
|
|
117
|
-
{
|
|
118
|
-
|
|
217
|
+
{
|
|
218
|
+
"action": "snapshot",
|
|
219
|
+
"phase": "compat-post"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"action": "dto_rewrap"
|
|
223
|
+
}
|
|
119
224
|
]
|
|
120
225
|
},
|
|
121
226
|
"response": {
|
|
122
227
|
"mappings": [
|
|
123
|
-
{
|
|
124
|
-
|
|
228
|
+
{
|
|
229
|
+
"action": "snapshot",
|
|
230
|
+
"phase": "compat-pre"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"action": "dto_unwrap"
|
|
234
|
+
},
|
|
125
235
|
{
|
|
126
236
|
"action": "resp_blacklist",
|
|
127
237
|
"config": {
|
|
128
|
-
"paths": [
|
|
238
|
+
"paths": [
|
|
239
|
+
"usage.prompt_tokens_details.cached_tokens"
|
|
240
|
+
],
|
|
129
241
|
"keepCritical": true
|
|
130
242
|
}
|
|
131
243
|
},
|
|
@@ -135,11 +247,26 @@
|
|
|
135
247
|
"config": {
|
|
136
248
|
"request": {
|
|
137
249
|
"allowTopLevel": [
|
|
138
|
-
"model",
|
|
139
|
-
"
|
|
250
|
+
"model",
|
|
251
|
+
"messages",
|
|
252
|
+
"stream",
|
|
253
|
+
"thinking",
|
|
254
|
+
"do_sample",
|
|
255
|
+
"temperature",
|
|
256
|
+
"top_p",
|
|
257
|
+
"max_tokens",
|
|
258
|
+
"tools",
|
|
259
|
+
"tool_choice",
|
|
260
|
+
"stop",
|
|
261
|
+
"response_format"
|
|
140
262
|
],
|
|
141
263
|
"messages": {
|
|
142
|
-
"allowedRoles": [
|
|
264
|
+
"allowedRoles": [
|
|
265
|
+
"system",
|
|
266
|
+
"user",
|
|
267
|
+
"assistant",
|
|
268
|
+
"tool"
|
|
269
|
+
],
|
|
143
270
|
"assistantWithToolCallsContentNull": true,
|
|
144
271
|
"toolContentStringify": false
|
|
145
272
|
},
|
|
@@ -148,25 +275,61 @@
|
|
|
148
275
|
"normalize": false,
|
|
149
276
|
"forceToolChoiceAuto": true
|
|
150
277
|
},
|
|
151
|
-
"assistantToolCalls": {
|
|
278
|
+
"assistantToolCalls": {
|
|
279
|
+
"functionArgumentsType": "string"
|
|
280
|
+
}
|
|
152
281
|
},
|
|
153
282
|
"response": {
|
|
154
283
|
"allowTopLevel": [
|
|
155
|
-
"id",
|
|
156
|
-
"
|
|
157
|
-
"
|
|
284
|
+
"id",
|
|
285
|
+
"request_id",
|
|
286
|
+
"created",
|
|
287
|
+
"model",
|
|
288
|
+
"choices",
|
|
289
|
+
"usage",
|
|
290
|
+
"video_result",
|
|
291
|
+
"web_search",
|
|
292
|
+
"content_filter",
|
|
293
|
+
"required_action",
|
|
294
|
+
"output",
|
|
295
|
+
"output_text",
|
|
296
|
+
"status"
|
|
158
297
|
],
|
|
159
298
|
"choices": {
|
|
160
299
|
"required": true,
|
|
161
300
|
"message": {
|
|
162
|
-
"allow": [
|
|
301
|
+
"allow": [
|
|
302
|
+
"role",
|
|
303
|
+
"content",
|
|
304
|
+
"reasoning_content",
|
|
305
|
+
"audio",
|
|
306
|
+
"tool_calls"
|
|
307
|
+
],
|
|
163
308
|
"roleDefault": "assistant",
|
|
164
309
|
"contentNullWhenToolCalls": true,
|
|
165
|
-
"tool_calls": {
|
|
310
|
+
"tool_calls": {
|
|
311
|
+
"function": {
|
|
312
|
+
"nameRequired": true,
|
|
313
|
+
"argumentsType": "string"
|
|
314
|
+
}
|
|
315
|
+
}
|
|
166
316
|
},
|
|
167
|
-
"finish_reason": [
|
|
317
|
+
"finish_reason": [
|
|
318
|
+
"stop",
|
|
319
|
+
"tool_calls",
|
|
320
|
+
"length",
|
|
321
|
+
"sensitive",
|
|
322
|
+
"network_error"
|
|
323
|
+
]
|
|
168
324
|
},
|
|
169
|
-
"usage": {
|
|
325
|
+
"usage": {
|
|
326
|
+
"allow": [
|
|
327
|
+
"prompt_tokens",
|
|
328
|
+
"completion_tokens",
|
|
329
|
+
"prompt_tokens_details",
|
|
330
|
+
"total_tokens"
|
|
331
|
+
]
|
|
332
|
+
}
|
|
170
333
|
}
|
|
171
334
|
}
|
|
172
335
|
},
|
|
@@ -174,12 +337,36 @@
|
|
|
174
337
|
"action": "field_map",
|
|
175
338
|
"direction": "outgoing",
|
|
176
339
|
"config": [
|
|
177
|
-
{
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
{
|
|
340
|
+
{
|
|
341
|
+
"sourcePath": "usage.input_tokens",
|
|
342
|
+
"targetPath": "usage.prompt_tokens",
|
|
343
|
+
"type": "number"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"sourcePath": "usage.output_tokens",
|
|
347
|
+
"targetPath": "usage.completion_tokens",
|
|
348
|
+
"type": "number"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"sourcePath": "usage.total_input_tokens",
|
|
352
|
+
"targetPath": "usage.prompt_tokens",
|
|
353
|
+
"type": "number"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"sourcePath": "usage.total_output_tokens",
|
|
357
|
+
"targetPath": "usage.completion_tokens",
|
|
358
|
+
"type": "number"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"sourcePath": "created_at",
|
|
362
|
+
"targetPath": "created",
|
|
363
|
+
"type": "number"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"sourcePath": "request_id",
|
|
367
|
+
"targetPath": "request_id",
|
|
368
|
+
"type": "string"
|
|
369
|
+
},
|
|
183
370
|
{
|
|
184
371
|
"sourcePath": "choices[*].finish_reason",
|
|
185
372
|
"targetPath": "choices[*].finish_reason",
|
|
@@ -193,34 +380,26 @@
|
|
|
193
380
|
}
|
|
194
381
|
]
|
|
195
382
|
},
|
|
196
|
-
{ "action": "tool_schema_sanitize", "mode": "glm_shell" },
|
|
197
|
-
{ "action": "response_normalize" },
|
|
198
|
-
{ "action": "extract_glm_tool_markup" },
|
|
199
383
|
{
|
|
200
|
-
"action": "
|
|
201
|
-
"
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
"shell_command": "exec_command",
|
|
206
|
-
"shell": "exec_command",
|
|
207
|
-
"bash": "exec_command",
|
|
208
|
-
"terminal": "exec_command"
|
|
209
|
-
},
|
|
210
|
-
"argumentAliases": {
|
|
211
|
-
"exec_command": {
|
|
212
|
-
"cmd": ["cmd", "command", "input.command", "script"],
|
|
213
|
-
"command": ["cmd", "command", "input.command", "script"],
|
|
214
|
-
"workdir": ["workdir", "cwd", "input.cwd"]
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
384
|
+
"action": "tool_schema_sanitize",
|
|
385
|
+
"mode": "glm_shell"
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
"action": "response_normalize"
|
|
220
389
|
},
|
|
221
|
-
{
|
|
222
|
-
|
|
223
|
-
|
|
390
|
+
{
|
|
391
|
+
"action": "extract_glm_tool_markup"
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"action": "response_validate"
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"action": "snapshot",
|
|
398
|
+
"phase": "compat-post"
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
"action": "dto_rewrap"
|
|
402
|
+
}
|
|
224
403
|
]
|
|
225
404
|
}
|
|
226
405
|
}
|