feat(wasm): align LLM and route types with platform-v2 SDK#16
Conversation
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
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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)
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. Comment |
…-sdk # Conflicts: # wasm/src/routes.rs # wasm/src/types.rs
…f64/f32 temperature mismatch and ensure serialization compatibility
Summary
Replace local duplicate type definitions in
term-challenge-wasmwith re-exports fromplatform_challenge_sdk_wasmto ensure type consistency across the platform stack.Changes
wasm/src/types.rsLlmMessage,LlmRequest(hadtemperature: f64), andLlmResponsestruct definitionsRouteDefinitionstruct (missingrequires_authfield)WasmRouteRequeststruct (missingparams/queryfields)LlmMessage,LlmRequest(temperature: f32),LlmResponseWasmRouteDefinition,WasmRouteRequestwasm/src/routes.rsRouteDefinitiontoWasmRouteDefinitionget_route_definitions()return type toVec<WasmRouteDefinition>requires_authfield (GET routes =false, auth-required POST routes =true)Key decisions
LlmUsagenot re-exported since it is unused in term-challenge (avoids unused import warning)temperature: 0.1literal inllm_review.rscorrectly infers asf32— no change needed/submitPOST route markedrequires_auth: truesince it processes authenticated submissions