Switch to JWT token for inference against Nous, falling back to old opaque token on failure.

This commit is contained in:
Robin Fernandes
2026-05-17 19:34:44 +10:00
committed by Teknium
parent c905562623
commit 89a3d038cf
10 changed files with 780 additions and 45 deletions

View File

@@ -166,6 +166,8 @@ class PooledCredential:
@property
def runtime_api_key(self) -> str:
if self.provider == "nous":
# Nous stores the runtime inference credential in agent_key for
# compatibility. It may be a NAS invoke JWT or legacy opaque key.
return str(self.agent_key or self.access_token or "")
return str(self.access_token or "")