Skip to content

feat(wasm): align LLM and route types with platform-v2 SDK#16

Merged
echobt merged 10 commits intomainfrom
feat/align-types-with-sdk
Feb 20, 2026
Merged

feat(wasm): align LLM and route types with platform-v2 SDK#16
echobt merged 10 commits intomainfrom
feat/align-types-with-sdk

Conversation

@echobt
Copy link

@echobt echobt commented Feb 20, 2026

Summary

Replace local duplicate type definitions in term-challenge-wasm with re-exports from platform_challenge_sdk_wasm to ensure type consistency across the platform stack.

Changes

wasm/src/types.rs

  • Remove local LlmMessage, LlmRequest (had temperature: f64), and LlmResponse struct definitions
  • Remove local RouteDefinition struct (missing requires_auth field)
  • Remove local WasmRouteRequest struct (missing params/query fields)
  • Add re-exports from SDK: LlmMessage, LlmRequest (temperature: f32), LlmResponse
  • Add re-exports from SDK: WasmRouteDefinition, WasmRouteRequest

wasm/src/routes.rs

  • Update import from RouteDefinition to WasmRouteDefinition
  • Update get_route_definitions() return type to Vec<WasmRouteDefinition>
  • Update all 27 route definitions with requires_auth field (GET routes = false, auth-required POST routes = true)

Key decisions

  • LlmUsage not re-exported since it is unused in term-challenge (avoids unused import warning)
  • temperature: 0.1 literal in llm_review.rs correctly infers as f32 — no change needed
  • /submit POST route marked requires_auth: true since it processes authenticated submissions

Replace local duplicate type definitions with re-exports from
platform_challenge_sdk_wasm to ensure type consistency across the stack.

types.rs:
- Remove local LlmMessage, LlmRequest (temperature: f64), LlmResponse structs
- Remove local RouteDefinition struct (missing requires_auth field)
- Remove local WasmRouteRequest struct (missing params/query fields)
- Add re-exports: LlmMessage, LlmRequest, LlmResponse from SDK (temperature: f32)
- Add re-exports: WasmRouteDefinition, WasmRouteRequest from SDK
- Fix cosmetic extra blank line left after struct removal

routes.rs:
- Update import from RouteDefinition to WasmRouteDefinition
- Update get_route_definitions() return type to Vec<WasmRouteDefinition>
- Update all 27 route definitions with requires_auth field:
  GET routes set to false, auth-required POST routes set to true
@coderabbitai
Copy link

coderabbitai bot commented Feb 20, 2026

Warning

Rate limit exceeded

@echobt has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 29 minutes and 32 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/align-types-with-sdk

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@echobt echobt merged commit 5cd4756 into main Feb 20, 2026
6 checks passed
@echobt echobt deleted the feat/align-types-with-sdk branch February 20, 2026 22:10
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