fix: point default TEE registry to the current contract#11
Open
gilbertsahumada wants to merge 1 commit into
Open
fix: point default TEE registry to the current contract#11gilbertsahumada wants to merge 1 commit into
gilbertsahumada wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Bumps
DEFAULT_TEE_REGISTRY_ADDRESSto the current on-chain TEE registry and extends thegetActiveTEEsABI tuple with theohttpConfigfield 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, soclient.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 to0x703c…, which has live TEEs. That registry'sgetActiveTEEsreturns an extraohttpConfigfield, 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)onhttps://ogevmdevnet.opengradient.ai(chain 10740), with the updated ABI: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 passingllmServerUrlmanually (which also disables on-chain TLS pinning), not something I want to ask every user to do.Notes
src/teeRegistry.tsis unchanged; it ignoresohttpConfig.getActiveTEERecordsWithOHTTPConfigmethod); this fixes the defaultgetActiveTEEsdiscovery path.ohttpConfigstruct was taken from the Python SDK'sTEERegistry.abiand confirmed by decoding the live contract (the deployed contract is not source-verified on the explorer).0x703cB174…Abda6is the canonical current registry (not one of several deployments)?