Skip to content

Conversation

@thucpn
Copy link
Collaborator

@thucpn thucpn commented Jun 30, 2025

Summary by CodeRabbit

  • Bug Fixes

    • Resolved issues with peer dependencies and sourcemaps that were preventing the server from starting correctly.
  • Chores

    • Updated "@llamaindex/tools" dependency to version "~0.1.2" across multiple packages.
    • Added new dependencies to improve sourcemap handling.

@thucpn thucpn requested a review from marcusschiesser June 30, 2025 08:46
@changeset-bot
Copy link

changeset-bot bot commented Jun 30, 2025

🦋 Changeset detected

Latest commit: 1c46740

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
create-llama Patch
@llamaindex/server Patch
llamaindex-server-examples Patch
@create-llama/llama-index-server Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link

coderabbitai bot commented Jun 30, 2025

Walkthrough

This update modifies dependency versions across several package.json files, primarily upgrading "@llamaindex/tools" to "~0.1.2". Additionally, it adds three sourcemap-related packages to the server package to address TypeScript server startup issues linked to peer dependencies and sourcemap configuration.

Changes

Files Change Summary
.../create-llama/templates/types/llamaindexserver/nextjs/package.json Updated "@llamaindex/tools" version from "~0.0.11" to "~0.1.2".
packages/server/examples/package.json
packages/server/project-config/package.json
Updated "@llamaindex/tools" version from "~0.0.11" to "~0.1.2".
packages/server/package.json Added dependencies: "@jridgewell/sourcemap-codec" (1.5.0), "@jridgewell/gen-mapping" (0.3.8), and "@jridgewell/trace-mapping" (0.3.25).

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant Server as @llamaindex/server
    participant Sourcemap as Sourcemap Packages
    participant TS as TypeScript Server

    Dev->>Server: Starts server (with updated dependencies)
    Server->>Sourcemap: Loads sourcemap packages
    Server->>TS: Initializes TypeScript server
    TS-->>Server: Startup succeeds (dependencies and sourcemaps resolved)
Loading

Possibly related PRs

Suggested reviewers

  • marcusschiesser
  • leehuwuj

Poem

A hop, a skip, a version bump,
Sourcemaps join the server’s jump.
Dependencies now align in tune,
TypeScript starts up none too soon.
With every patch, the code grows strong—
Hopping forward, we all belong!
🐇✨


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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@thucpn thucpn marked this pull request as ready for review June 30, 2025 09:29
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/server/package.json (1)

63-65: Double-check necessity & bundle impact of the new @jridgewell/* packages

These three packages are often shipped transitively by build tools (e.g. Babel, Next). Adding them explicitly:

  • prevents “missing peer” errors – 👍
  • but may bloat the published bundle if they get duplicated.

Action items:

  1. run pnpm why @jridgewell/sourcemap-codec to confirm no duplicates,
  2. if they end up being build-time only, consider devDependencies instead.
.changeset/nervous-trainers-pull.md (1)

6-6: Nit: tighten the changeset summary

Consider a more descriptive line, e.g.:

Fix TS-server startup failure caused by peer-dep clashes and missing sourcemap packages

This helps future readers scanning the changelog.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e8004fd and 1c46740.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • .changeset/nervous-trainers-pull.md (1 hunks)
  • packages/create-llama/templates/types/llamaindexserver/nextjs/package.json (1 hunks)
  • packages/server/examples/package.json (1 hunks)
  • packages/server/package.json (1 hunks)
  • packages/server/project-config/package.json (1 hunks)
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
PR: run-llama/create-llama#0
File: packages/server/CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:27.046Z
Learning: The LlamaIndexServer class in src/server.ts centralizes server setup, workflow initialization, UI configuration, and custom routing, providing a single entry point for server logic in a Next.js-based application.
Learnt from: CR
PR: run-llama/create-llama#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:05.815Z
Learning: The build process for the TypeScript server package involves multiple steps: cleaning, bunchee compilation to ESM/CJS, Next.js preparation, static asset generation, and preparing assets for Python integration.
Learnt from: CR
PR: run-llama/create-llama#0
File: packages/server/examples/CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:35.770Z
Learning: Integration with LlamaIndex Core, OpenAI, and React/Next.js enables document processing, LLM/embedding model usage, and modern frontend development, respectively, forming a comprehensive full-stack architecture.
Learnt from: CR
PR: run-llama/create-llama#0
File: python/llama-index-server/CLAUDE.md:0-0
Timestamp: 2025-06-27T07:32:15.730Z
Learning: For UI development, use only supported dependencies (React, shadcn/ui, Lucide React, Tailwind CSS, and LlamaIndex Chat UI) to ensure compatibility and maintainability.
Learnt from: CR
PR: run-llama/create-llama#0
File: packages/server/examples/CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:35.770Z
Learning: TypeScript configuration enforces strict type checking, targets ES2022, and uses bundler module resolution, which enhances code quality and compatibility.
Learnt from: CR
PR: run-llama/create-llama#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:05.815Z
Learning: Version synchronization is maintained between TypeScript and Python packages, with shared UI components and styling to ensure consistency across implementations.
packages/server/examples/package.json (6)
Learnt from: CR
PR: run-llama/create-llama#0
File: packages/server/CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:27.046Z
Learning: The LlamaIndexServer class in src/server.ts centralizes server setup, workflow initialization, UI configuration, and custom routing, providing a single entry point for server logic in a Next.js-based application.
Learnt from: CR
PR: run-llama/create-llama#0
File: packages/server/examples/CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:35.770Z
Learning: Integration with LlamaIndex Core, OpenAI, and React/Next.js enables document processing, LLM/embedding model usage, and modern frontend development, respectively, forming a comprehensive full-stack architecture.
Learnt from: CR
PR: run-llama/create-llama#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:05.815Z
Learning: Development environment setup requires Node.js >=16.14.0, Python with the uv package manager, and pnpm for package management, supporting concurrent development across packages.
Learnt from: CR
PR: run-llama/create-llama#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:05.815Z
Learning: The repository is a monorepo combining TypeScript/Node.js and Python components, using pnpm for workspace management and supporting unified development workflows.
Learnt from: CR
PR: run-llama/create-llama#0
File: packages/create-llama/CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:17.317Z
Learning: The create-llama CLI tool is designed to scaffold RAG (Retrieval-Augmented Generation) applications using a flexible template system that supports multiple frameworks (NextJS, Express, FastAPI), model providers (OpenAI, Anthropic, Groq, Ollama), and vector databases (Mongo, Postgres, Pinecone, Milvus, etc.).
Learnt from: CR
PR: run-llama/create-llama#0
File: python/llama-index-server/CLAUDE.md:0-0
Timestamp: 2025-06-27T07:32:15.730Z
Learning: For UI development, use only supported dependencies (React, shadcn/ui, Lucide React, Tailwind CSS, and LlamaIndex Chat UI) to ensure compatibility and maintainability.
.changeset/nervous-trainers-pull.md (6)
Learnt from: CR
PR: run-llama/create-llama#0
File: packages/server/CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:27.046Z
Learning: The LlamaIndexServer class in src/server.ts centralizes server setup, workflow initialization, UI configuration, and custom routing, providing a single entry point for server logic in a Next.js-based application.
Learnt from: CR
PR: run-llama/create-llama#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:05.815Z
Learning: The build process for the TypeScript server package involves multiple steps: cleaning, bunchee compilation to ESM/CJS, Next.js preparation, static asset generation, and preparing assets for Python integration.
Learnt from: CR
PR: run-llama/create-llama#0
File: packages/server/examples/CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:35.770Z
Learning: Integration with LlamaIndex Core, OpenAI, and React/Next.js enables document processing, LLM/embedding model usage, and modern frontend development, respectively, forming a comprehensive full-stack architecture.
Learnt from: CR
PR: run-llama/create-llama#0
File: python/llama-index-server/CLAUDE.md:0-0
Timestamp: 2025-06-27T07:32:15.730Z
Learning: The LlamaIndexServer class (in llama_index/server/server.py) should be implemented by extending FastAPI and must support workflow factory patterns, UI configuration, automatic file serving, and development features such as CORS and hot reloading.
Learnt from: CR
PR: run-llama/create-llama#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:05.815Z
Learning: End-to-end testing is performed using Playwright in packages/create-llama/e2e/, validating both Python and TypeScript generated projects for correct CLI generation and application functionality.
Learnt from: CR
PR: run-llama/create-llama#0
File: packages/create-llama/CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:17.317Z
Learning: The create-llama CLI tool is designed to scaffold RAG (Retrieval-Augmented Generation) applications using a flexible template system that supports multiple frameworks (NextJS, Express, FastAPI), model providers (OpenAI, Anthropic, Groq, Ollama), and vector databases (Mongo, Postgres, Pinecone, Milvus, etc.).
packages/create-llama/templates/types/llamaindexserver/nextjs/package.json (11)
Learnt from: CR
PR: run-llama/create-llama#0
File: packages/server/CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:27.046Z
Learning: The LlamaIndexServer class in src/server.ts centralizes server setup, workflow initialization, UI configuration, and custom routing, providing a single entry point for server logic in a Next.js-based application.
Learnt from: CR
PR: run-llama/create-llama#0
File: packages/server/examples/CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:35.770Z
Learning: Integration with LlamaIndex Core, OpenAI, and React/Next.js enables document processing, LLM/embedding model usage, and modern frontend development, respectively, forming a comprehensive full-stack architecture.
Learnt from: CR
PR: run-llama/create-llama#0
File: packages/create-llama/CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:17.317Z
Learning: The create-llama CLI tool is designed to scaffold RAG (Retrieval-Augmented Generation) applications using a flexible template system that supports multiple frameworks (NextJS, Express, FastAPI), model providers (OpenAI, Anthropic, Groq, Ollama), and vector databases (Mongo, Postgres, Pinecone, Milvus, etc.).
Learnt from: CR
PR: run-llama/create-llama#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:05.815Z
Learning: Templates in packages/create-llama/templates/ are organized into types (base project structures) and components (reusable across frameworks), supporting multiple frameworks such as Next.js, Express, and FastAPI.
Learnt from: CR
PR: run-llama/create-llama#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:05.815Z
Learning: The build process for the TypeScript server package involves multiple steps: cleaning, bunchee compilation to ESM/CJS, Next.js preparation, static asset generation, and preparing assets for Python integration.
Learnt from: CR
PR: run-llama/create-llama#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:05.815Z
Learning: End-to-end testing is performed using Playwright in packages/create-llama/e2e/, validating both Python and TypeScript generated projects for correct CLI generation and application functionality.
Learnt from: CR
PR: run-llama/create-llama#0
File: python/llama-index-server/CLAUDE.md:0-0
Timestamp: 2025-06-27T07:32:15.730Z
Learning: The LlamaIndexServer class (in llama_index/server/server.py) should be implemented by extending FastAPI and must support workflow factory patterns, UI configuration, automatic file serving, and development features such as CORS and hot reloading.
Learnt from: CR
PR: run-llama/create-llama#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:05.815Z
Learning: Development environment setup requires Node.js >=16.14.0, Python with the uv package manager, and pnpm for package management, supporting concurrent development across packages.
Learnt from: CR
PR: run-llama/create-llama#0
File: packages/server/examples/CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:35.770Z
Learning: Agent creation across all examples leverages the agent() function from @llamaindex/workflow, always passing an array of tools, which standardizes agent configuration.
Learnt from: CR
PR: run-llama/create-llama#0
File: python/llama-index-server/CLAUDE.md:0-0
Timestamp: 2025-06-27T07:32:15.730Z
Learning: For UI development, use only supported dependencies (React, shadcn/ui, Lucide React, Tailwind CSS, and LlamaIndex Chat UI) to ensure compatibility and maintainability.
Learnt from: CR
PR: run-llama/create-llama#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:05.815Z
Learning: The repository is a monorepo combining TypeScript/Node.js and Python components, using pnpm for workspace management and supporting unified development workflows.
packages/server/project-config/package.json (4)
Learnt from: CR
PR: run-llama/create-llama#0
File: packages/server/CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:27.046Z
Learning: The LlamaIndexServer class in src/server.ts centralizes server setup, workflow initialization, UI configuration, and custom routing, providing a single entry point for server logic in a Next.js-based application.
Learnt from: CR
PR: run-llama/create-llama#0
File: python/llama-index-server/CLAUDE.md:0-0
Timestamp: 2025-06-27T07:32:15.730Z
Learning: For UI development, use only supported dependencies (React, shadcn/ui, Lucide React, Tailwind CSS, and LlamaIndex Chat UI) to ensure compatibility and maintainability.
Learnt from: CR
PR: run-llama/create-llama#0
File: packages/server/examples/CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:35.770Z
Learning: Integration with LlamaIndex Core, OpenAI, and React/Next.js enables document processing, LLM/embedding model usage, and modern frontend development, respectively, forming a comprehensive full-stack architecture.
Learnt from: CR
PR: run-llama/create-llama#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:05.815Z
Learning: Development environment setup requires Node.js >=16.14.0, Python with the uv package manager, and pnpm for package management, supporting concurrent development across packages.
packages/server/package.json (2)
Learnt from: CR
PR: run-llama/create-llama#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:05.815Z
Learning: The build process for the TypeScript server package involves multiple steps: cleaning, bunchee compilation to ESM/CJS, Next.js preparation, static asset generation, and preparing assets for Python integration.
Learnt from: CR
PR: run-llama/create-llama#0
File: packages/server/examples/CLAUDE.md:0-0
Timestamp: 2025-06-27T07:31:35.770Z
Learning: TypeScript configuration enforces strict type checking, targets ES2022, and uses bundler module resolution, which enhances code quality and compatibility.
⏰ Context from checks skipped due to timeout of 90000ms (15)
  • GitHub Check: typescript (22, ubuntu-22.04, nextjs, none)
  • GitHub Check: typescript (22, windows-latest, nextjs, llamacloud)
  • GitHub Check: python (20, 3.11, windows-latest, fastapi, llamacloud)
  • GitHub Check: lint
  • GitHub Check: typescript (22, ubuntu-22.04, nextjs, llamacloud)
  • GitHub Check: python (20, 3.11, ubuntu-22.04, fastapi, none)
  • GitHub Check: typescript (22, windows-latest, nextjs, none)
  • GitHub Check: python (20, 3.11, ubuntu-22.04, fastapi, llamacloud)
  • GitHub Check: typescript (22, macos-latest, nextjs, llamacloud)
  • GitHub Check: typescript (22, macos-latest, nextjs, none)
  • GitHub Check: python (20, 3.11, windows-latest, fastapi, none)
  • GitHub Check: python (20, 3.11, macos-latest, fastapi, none)
  • GitHub Check: python (20, 3.11, macos-latest, fastapi, llamacloud)
  • GitHub Check: Unit Tests (ubuntu-latest, 3.9)
  • GitHub Check: Unit Tests (windows-latest, 3.9)
🔇 Additional comments (3)
packages/create-llama/templates/types/llamaindexserver/nextjs/package.json (1)

16-16: Verify lock-file + downstream compatibility for the new @llamaindex/tools range

The bump to ~0.1.2 looks reasonable and is aligned with the rest of the workspace, but please make sure to:

  1. regenerate / commit the workspace lock-file (pnpm-lock.yaml) so CI doesn’t pick up mismatched versions,
  2. run a quick smoke-test – @llamaindex/tools 0.1.x introduced some minor API tweaks.
packages/server/examples/package.json (1)

13-13: Keep the examples in sync with the template

Good catch updating the example project as well. Same due-diligence applies: confirm the lock-file is updated and the example still runs (pnpm dev).

packages/server/project-config/package.json (1)

48-48: Project config dependency bump mirrors other workspaces

No functional concerns – just remember to run pnpm -r exec pnpm install --lockfile-only (or similar) so every workspace sees the same transitive tree.

Comment on lines +63 to +65
"@jridgewell/sourcemap-codec": "1.5.0",
"@jridgewell/gen-mapping": "0.3.8",
"@jridgewell/trace-mapping": "0.3.25",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

install fixed version of these map packages to fix jridgewell/sourcemaps#31

@marcusschiesser marcusschiesser merged commit 952b5b4 into main Jun 30, 2025
18 checks passed
@marcusschiesser marcusschiesser deleted the tp/e2e-fail branch June 30, 2025 10:17
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