Skip to content

fix: stabilize NPC model decision fallback#88

Merged
JOY (JOY) merged 2 commits into
mainfrom
dev
May 18, 2026
Merged

fix: stabilize NPC model decision fallback#88
JOY (JOY) merged 2 commits into
mainfrom
dev

Conversation

@JOY
Copy link
Copy Markdown
Contributor

Summary

  • extend the Unity agent-decision RPC timeout separately from normal Nakama calls
  • pass an explicit DOS.AI timeout through the Nakama runtime HTTP call and persist model backoff for permanent NPC actors
  • back off repeated invalid/empty/timeout/502 model decisions and return structured NPC intent rejections instead of throwing gameplay-rule exceptions

Local review

  • Local code-review fallback: approved, no blockers found in the scoped diff
  • Boundary check: Unity still calls Nakama only; DOS.AI key remains server-side; model output remains validated intent only

Verification

  • npm run build (backend/nakama)
  • npm test (backend/nakama)
  • dotnet build Unity/SecondSpawn.AI.csproj --no-restore
  • dotnet build Unity/SecondSpawn.Networking.csproj --no-restore
  • git diff --check
  • docker restart second-spawn-nakama and /v2/rpc/secondspawn_health smoke
  • live DOS.AI smoke: one post-restart Nakama decision returned source=model in 1.89s; later direct api.dos.ai checks still showed upstream instability with 44.7s latency and 502 after 60s, so the PR hardens fallback/backoff but does not fix api.dos.ai/vLLM itself

JOY (JOY) added 2 commits May 19, 2026 00:04
Docs-only merge after local code-review fallback and green markdown lint.
@JOY JOY (JOY) merged commit 066320e into main May 18, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant