Skip to content

Conversation

@grabbou
Copy link
Contributor

@grabbou grabbou commented Jan 15, 2026

This PR aligns the @react-native-ai/llama provider implementation with the Apple and MLC providers for consistency across the codebase.

Core Implementation Changes

  • Added rawCall to doStream return value (matches Apple/MLC)
  • Added providerMetadata to doGenerate response with timing information
  • Removed excessive logging (~10 console.log/error statements)
  • Unified error handling - fixed ReadableStream error message punctuation and error wrapping
  • Removed unnecessary try-catch blocks - aligned with Apple provider pattern (token callback, controller.close, cancel method)

Documentation & Dependencies

  • Unified README - adopted Apple provider's concise documentation style
  • Updated contributor list
  • Fixed dependency management - removed react-native-blob-util from expo-example (now transitive) and documentation (bundled with llama package)
  • Updated MLC README - added download/prepare steps for completeness

- Add rawCall to doStream return value for consistency
- Add providerMetadata to doGenerate response
- Remove excessive console logging throughout streaming
- Fix error handling consistency (polyfill message, error wrapping)
- Remove unnecessary try-catch blocks to match Apple provider
- Unify README documentation style with Apple provider
- Add Mike Grabowski to contributors
- Remove react-native-blob-util from expo-example (transitive dependency)
- Update llama documentation to remove blob-util from installation
- Update MLC README with download/prepare steps for completeness
@vercel
Copy link

vercel bot commented Jan 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
ai Ready Ready Preview, Comment Jan 15, 2026 1:17pm

@grabbou grabbou requested a review from artus9033 January 15, 2026 11:59
@grabbou
Copy link
Contributor Author

grabbou commented Jan 15, 2026

I have also removed flags isCancelled etc., since we cancel the stream and will close the controller in the last chunk. This is aligned with how we do it for Apple. Any changes to this behavior - best if we do it once for all providers.

Copy link
Contributor

@artus9033 artus9033 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Always happy to unify :D

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.

3 participants