feat: 接入起卦后端流程并完善积分扣减链路

This commit is contained in:
qzl
2026-04-03 19:04:46 +08:00
parent a136e42290
commit d87b2e1e3a
56 changed files with 3310 additions and 809 deletions
+12
View File
@@ -17,6 +17,7 @@ from core.agentscope.schemas.agui_input import extract_latest_user_payload
from core.config.settings import config
from core.logging import get_logger
from schemas.agent.forwarded_props import (
parse_forwarded_props_divination_payload,
parse_forwarded_props_runtime_mode,
RuntimeMode,
)
@@ -93,11 +94,22 @@ class AgentService:
forwarded_props = getattr(run_input, "forwarded_props", None)
try:
runtime_mode = parse_forwarded_props_runtime_mode(forwarded_props)
divination_payload = parse_forwarded_props_divination_payload(
forwarded_props
)
except ValueError as exc:
raise ApiProblemError(
status_code=422,
detail=problem_payload(code="AGENT_PAYLOAD_INVALID", detail=str(exc)),
) from exc
if divination_payload is None:
raise ApiProblemError(
status_code=422,
detail=problem_payload(
code="AGENT_DIVINATION_PAYLOAD_REQUIRED",
detail="forwardedProps.divinationPayload is required",
),
)
if runtime_config is None:
from v1.agent.system_agents_config import (