Skip to content

fix: point default TEE registry to the current contract#11

Open
gilbertsahumada wants to merge 1 commit into
OpenGradient:mainfrom
gilbertsahumada:fix/default-tee-registry-address
Open

fix: point default TEE registry to the current contract#11
gilbertsahumada wants to merge 1 commit into
OpenGradient:mainfrom
gilbertsahumada:fix/default-tee-registry-address

Conversation

@gilbertsahumada

@gilbertsahumada gilbertsahumada commented Jun 23, 2026

Copy link
Copy Markdown

What

Bumps DEFAULT_TEE_REGISTRY_ADDRESS to the current on-chain TEE registry and extends the getActiveTEEs ABI tuple with the ohttpConfig field that registry returns.

Fixes #10.

Why

Out of the box the SDK discovers no LLM-proxy TEE: the default registry (0x4e72…) has 0 active TEEs, so client.llm.chat(...) fails (after a successful Permit2 approval) with "No active LLM proxy TEE found in the registry". The maintained Python SDK 1.1.0 defaults to 0x703c…, which has live TEEs. That registry's getActiveTEEs returns an extra ohttpConfig field, so overriding the address alone isn't enough: viem decodes tuples positionally and throws on the extra field (caught internally, returns []). This fixes both halves together.

Verification (read-only, on-chain)

getActiveTEEs(0) on https://ogevmdevnet.opengradient.ai (chain 10740), with the updated ABI:

NEW 0x703c -> 3 TEE(s) decoded OK (enabled=true, ohttpConfig decodes)
OLD 0x4e72 -> 0 TEE(s)

The 3 endpoints match the registry explorer's active LLMProxy nodes. Build, lint, and the jest suite pass.

Context / motivation

I'm building a community OpenGradient provider for the Vercel AI SDK (opengradient-ai-provider), one of the most widely used TS toolkits for LLM apps, so OpenGradient inference is usable through that ecosystem. This bug blocks the default zero-config path; today I work around it by passing llmServerUrl manually (which also disables on-chain TLS pinning), not something I want to ask every user to do.

Notes

  • The reading code in src/teeRegistry.ts is unchanged; it ignores ohttpConfig.
  • Orthogonal to Add OHTTP utils #9 (which adds OHTTP via a separate getActiveTEERecordsWithOHTTPConfig method); this fixes the default getActiveTEEs discovery path.
  • ABI provenance: the ohttpConfig struct was taken from the Python SDK's TEERegistry.abi and confirmed by decoding the live contract (the deployed contract is not source-verified on the explorer).
  • Could a maintainer confirm 0x703cB174…Abda6 is the canonical current registry (not one of several deployments)?

DEFAULT_TEE_REGISTRY_ADDRESS pointed at a deprecated registry with 0 active
LLM-proxy TEEs, so default-config inference always failed with 'No active LLM
proxy TEE found in the registry'. Bump it to the current registry (0x703c, the
same one the Python SDK 1.1.0 uses), which has live TEEs.

That registry's getActiveTEEs returns an extra ohttpConfig field, so extend the
ABI tuple to match; otherwise viem fails to decode and discovery returns empty.
The reading code is unchanged (it ignores ohttpConfig).

Verified read-only on-chain: the new registry decodes 3 active TEEs, the old
one decodes 0.
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.

Default TEE registry is empty: no LLM inference works out of the box

1 participant