Make Codex and Claude Code subscriptions go further: a local model router that gives routine agent work to economical models and keeps your strongest model for the hard parts.
Rust ai-agentsai-gatewayclaude-codecodexcoding-agentcost-optimizationdeepseekllm-gatewayllm-routerlocal-firstmodel-routingrusttask-routingtauri
{
"source_revision": "13856abd873da5b4373d39322493b4cc105c4867",
"source_release": "v0.3.1",
"source_artifact_sha256": "dfa35ada12fcef9d0d2e10e680422cd0bf6a0454a8809c27879b74ba932d21aa",
"envelope_digest": "sha256:b421a2b59471d9e069eb2b1d8ed9632598d034c40bfd6fc30e7a36a5df0b98c2",
"envelope": {
"schema_version": "hiroute.observation.product-execution-envelope/v2",
"schema_digest": "sha256:80b4ff13af8abc79d7721fea42141300beade2acf1d2659983ceaafcdc6e4799",
"channel": "execution_fact",
"producer": {
"component": "gateway-execution",
"revision": "hiroute-gateway-observation/1",
"stream": {
"producer_id": "execution_fact-producer-c298ec98592fdab60828a707ac011ee0cb2fcf96483a703c2ec1d7b7652c4ff5",
"producer_epoch": "execution_fact-epoch-84e0c3cdbc93666f933272254bda5c697ce070b7134466737ab6da9af1d832fd",
"stream_id": "execution_fact-stream-73ba92f8674607a5406398b7cda5fa28db8c9bfbc472bc79da8f2cd530a23ae7"
}
},
"sequence": 1,
"event_id": "fact-event-0b9ecf8f6274dd7630a67a6801d80585a55dbb03456f5dcc0296d848baa0b72d",
"correlation": {
"workspace_id": "personal/default",
"conversation_id": "observation-session-20ee870f31d646a050b0c514787c2a7c4efdcf410e762735a62466ea8d54db81",
"session_scope": "conversation",
"correlation_provenance": "agent_supplied",
"turn_id": "turn-4a48d3dae2af95fdd2f0194356549ecc11f47b84b94a0a63a30287fe4cadb1ca",
"request_id": "request-83a0c38fe78f2ebd3f8d35c7210131e1301747b7ed460526d03339a9141a031c"
},
"trust": {
"authority_id": "personal/default",
"authority_epoch": 1,
"served_model_id": "hiroute-richangbianma",
"selector_source": "trusted_model_alias",
"agent_plan_id": "plan/56b0df6ca77e8df83b819fff",
"route": {
"kind": "plan",
"revision": 2,
"semantic_digest": "sha256:dc41f4f6534208ff88405a1b1ed52d8f0d17436dc03efe08be5814a63726a755"
},
"plan_display_name": "日常编码",
"gateway_publication_revision": "3",
"gateway_publication_digest": "sha256:f80f173f92b6dc9d88a83a1e4421537c98793457312dca0c3862baaaa93ba97c",
"grant_id": "grant_1b740cbf1db8b78b217cbe13b60f8f69",
"grant_generation": 1,
"ingress_protocol": "responses"
},
"occurred_at_unix_nanos": 1792310728215487583,
"fact": {
"kind": "route_decision",
"planner_version": "hiroute-deterministic-planner/v1",
"plan_id": "plan/56b0df6ca77e8df83b819fff",
"route": {
"kind": "plan",
"revision": 2,
"semantic_digest": "sha256:dc41f4f6534208ff88405a1b1ed52d8f0d17436dc03efe08be5814a63726a755"
},
"input_digest": "sha256:de89f36fbb0754aae48734bd7fc6d96836ae0b58cba91245344041909dbca9eb",
"policy_digest": "sha256:e5d39232a6bca078640e4958c542f7f5da3a8b56bea290c460d4ece31ff0a396",
"output_digest": "sha256:f3b1f10aedde092637633fe12bb26e406c4ef907eb957aa31c347cde20c3aeae",
"branch": "smart_saving_simple",
"complexity": {
"policy": {
"name": "Smart saving",
"floor_millis": 500,
"criteria_digest": "sha256:ece003e12d95024dbfb37f2d5b2163a0f38f12c4f6abe665c908250334c7f454"
},
"execution_group": "regular",
"simple_probability": 0.9,
"simple_threshold_millis": 800,
"selection_reason": "simple_task",
"strategy_id": "hiroute-complexity-v1",
"schema_version": "hiroute-route-strategy-v1",
"payload_digest": "sha256:9922f1e316f5a16d2d65fd6bf6e55d16eb5b52deddb21fd4d1e176a473f1455a",
"branch_id": "smart_saving",
"complexity_score": null,
"threshold": null,
"decision_source": "external_classifier",
"reason_codes": [],
"matched_user_phrase_ids": [],
"fallback_used": false,
"classification_duration_micros": 6828,
"fallback_reason": null
},
"groups": [
{
"ordinal": 0,
"group_id": "economy",
"ranked_candidate_ids": [
"binding/managed-a2b22df69fca5deeaee2457b"
]
},
{
"ordinal": 1,
"group_id": "primary",
"ranked_candidate_ids": []
}
],
"reason_ledger": [
{
"ordinal": 0,
"code": "SMART_SAVING_SIMPLE",
"group_id": null
},
{
"ordinal": 1,
"code": "GROUP_EXHAUSTED_FALLBACK",
"group_id": "primary"
}
],
"requirements": {
"ingress_protocol": "responses",
"text": true,
"initial_instructions": false,
"mid_conversation_instructions": false,
"image_url": false,
"image_base64": false,
"image_media_types": [],
"function_tools": false,
"strict_tools": false,
"tool_choice": {
"kind": "auto"
},
"parallel_tools": false,
"tool_roundtrip": false,
"tool_result_text": false,
"tool_result_json": false,
"logical_tool_id_mapping": false,
"streaming": true,
"stream_text": true,
"stream_tool_arguments": false,
"stream_reasoning": true,
"stream_usage": true,
"provider_state": false
},
"requested_reasoning_disposition": "absent",
"requested_reasoning_value": null,
"requested_max_output_tokens": null,
"stream": true,
"outcome": "ready",
"outcome_code": null,
"max_attempts": 1
}
}
}