Skip to content

Add VitePress documentation site and GitHub Actions for build + Pages deployment#4

Merged
mahimairaja merged 3 commits intomainfrom
feat/plan-documentation-for-openrtc-package
Mar 19, 2026
Merged

Add VitePress documentation site and GitHub Actions for build + Pages deployment#4
mahimairaja merged 3 commits intomainfrom
feat/plan-documentation-for-openrtc-package

Conversation

@mahimairaja
Copy link
Copy Markdown
Collaborator

@mahimairaja mahimairaja commented Mar 19, 2026

Motivation

  • Provide a self-hosted documentation site for the project using VitePress and publish it to GitHub Pages.
  • Keep deployment configuration inside GitHub Actions to avoid maintaining a separate gh-pages branch.
  • Ship a minimal docs surface that documents the public API, architecture, examples, CLI, and deployment instructions.

Description

  • Add a VitePress site under docs/ with configuration in docs/.vitepress/config.ts and a site base of /openrtc-python/.
  • Add documentation pages including index.md, getting-started.md, concepts/architecture.md, api/pool.md, examples.md, cli.md, and deployment/github-pages.md along with docs/public/logo.svg.
  • Add a package.json with docs:dev, docs:build, and docs:preview scripts and a vitepress devDependency for building the site.
  • Add two GitHub Actions workflows: docs.yml to build the docs on PRs and pushes and deploy-docs.yml to build, upload the site artifact, and deploy to GitHub Pages using actions/deploy-pages.

Testing

  • No automated tests were executed as part of this change.
  • The new CI job build-docs is configured to run npm install and npm run docs:build on pull_request and push events.
  • The deploy-docs.yml workflow is configured to build the site, upload docs/.vitepress/dist as an artifact, and publish with actions/deploy-pages@v4 when run on main.

Codex Task

Summary by CodeRabbit

  • Documentation

    • Added comprehensive user documentation suite including getting started guide, architecture overview, API reference, code examples, and CLI documentation.
    • Added GitHub Pages deployment setup guide with repository configuration instructions.
  • Chores

    • Configured GitHub Actions workflows for automatic documentation building and deployment to GitHub Pages.
    • Added VitePress configuration for documentation site generation.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 19, 2026

Warning

Rate limit exceeded

@mahimairaja has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 4 minutes and 0 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.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 815be68e-2d7e-4b3a-b096-3eb63673040d

📥 Commits

Reviewing files that changed from the base of the PR and between 1135049 and 7ddf21c.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (9)
  • .github/workflows/deploy-docs.yml
  • .github/workflows/docs.yml
  • docs/.vitepress/config.ts
  • docs/api/pool.md
  • docs/concepts/architecture.md
  • docs/getting-started.md
  • docs/index.md
  • package.json
  • tests/test_pool.py
📝 Walkthrough

Walkthrough

This pull request introduces a complete documentation site for OpenRTC using VitePress, including GitHub Pages deployment automation via GitHub Actions. It adds configuration files, CI/CD workflows, NPM scripts, and comprehensive documentation covering getting started, API, architecture, CLI, examples, and deployment guidance.

Changes

Cohort / File(s) Summary
GitHub Actions Workflows
.github/workflows/deploy-docs.yml, .github/workflows/docs.yml
Added CI/CD automation for building and deploying VitePress documentation. deploy-docs.yml handles automated deployment to GitHub Pages on pushes to main with concurrency controls; docs.yml runs build validation on pull requests and main branch pushes.
VitePress Configuration
docs/.vitepress/config.ts
VitePress site configuration defining metadata, theme customization, navigation structure, sidebar organization across guide/concepts/reference sections, local search, GitHub links, and edit link settings.
Documentation Landing & Getting Started
docs/index.md, docs/getting-started.md
Site landing page introducing OpenRTC with key features and navigation links; getting-started guide covering prerequisites, installation, quick-start example, agent routing behavior, and error handling.
Conceptual & Architecture Documentation
docs/concepts/architecture.md, docs/examples.md
Architecture overview explaining AgentConfig, AgentPool, session lifecycle, prewarm configuration, and dependencies; examples page describing a multi-agent setup with restaurant and dental agents.
API & CLI Documentation
docs/api/pool.md, docs/cli.md
API reference for AgentPool and AgentConfig with method signatures, validation rules, and exceptions; CLI documentation noting the current placeholder implementation.
Deployment Documentation
docs/deployment/github-pages.md
GitHub Pages deployment guide covering CI workflow architecture, one-time setup steps, required VitePress configuration, and local development commands.
Package Configuration
package.json
NPM package file with VitePress dev dependency and scripts for development, build, and preview modes of the documentation site.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A warren of docs now springs to life,
With VitePress wielding its styling knife,
GitHub Actions hops the code to Pages,
Where users explore architectural stages,
OpenRTC's spirit captured in prose and delight! 📚✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately summarizes the main changes: adding VitePress documentation and GitHub Actions workflows for building and deploying to Pages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/plan-documentation-for-openrtc-package
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Copy link
Copy Markdown

@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: 4

🧹 Nitpick comments (5)
.github/workflows/docs.yml (1)

34-35: Consider using npm ci instead of npm install for CI builds.

npm ci is preferred in CI environments as it performs a clean install based on package-lock.json, ensuring reproducible builds. Also consider adding Node.js dependency caching to speed up subsequent runs.

♻️ Proposed improvement
       - name: Set up Node.js
         uses: actions/setup-node@v4
         with:
           node-version: '20'
+          cache: 'npm'

       - name: Install dependencies
-        run: npm install
+        run: npm ci
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/docs.yml around lines 34 - 35, Replace the "Install
dependencies" step's run command from `npm install` to `npm ci` to ensure clean,
reproducible installs based on package-lock.json (look for the step named
"Install dependencies"); additionally add a caching step using actions/cache
(e.g., before that step) to cache Node.js dependencies (cache key derived from
package-lock.json and node-version, cache paths such as ~/.npm or
~/.npm/_cacache or node_modules depending on strategy) so CI runs are faster and
deterministic.
docs/index.md (1)

22-28: Consider adding CLI link for consistency with sidebar.

The "Read the docs" section doesn't include a link to the CLI documentation, though it appears in the sidebar under "Reference". For consistency, consider adding it.

📝 Proposed addition
 - [AgentPool API](./api/pool)
+- [CLI](./cli)
 - [Examples](./examples)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/index.md` around lines 22 - 28, Add a link to the CLI docs in the "Read
the docs" list under the "Read the docs" heading by inserting an entry for "CLI"
(e.g., the link text "CLI" pointing to the same path used in the sidebar such as
./reference/cli) so the list (Getting Started, Architecture, AgentPool API,
Examples, CLI, GitHub Pages deployment) matches the sidebar's "Reference"
inclusion.
.github/workflows/deploy-docs.yml (2)

34-43: Consider caching npm dependencies for faster builds.

The workflow installs npm dependencies without caching, which means every build downloads packages from scratch. Adding cache configuration would improve build performance.

⚡ Suggested enhancement to add npm caching
       - name: Set up Node.js
         uses: actions/setup-node@v4
         with:
           node-version: '20'
+          cache: 'npm'
 
       - name: Configure GitHub Pages
         uses: actions/configure-pages@v5

This leverages the built-in caching feature of actions/setup-node@v4 to cache node_modules based on package-lock.json.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/deploy-docs.yml around lines 34 - 43, Update the GitHub
Actions workflow to enable npm caching in the Node setup step: modify the
actions/setup-node@v4 invocation (the step with node-version: '20') to include
cache: 'npm' and cache-dependency-path pointing to package-lock.json (or
yarn.lock), and ensure the "Install dependencies" step (named "Install
dependencies") still runs npm install so the cache is restored/updated
automatically; this uses the built-in caching of actions/setup-node to speed
subsequent builds.

24-24: Consider a more descriptive job name.

The job is named build but it performs both building and deployment. A name like build-and-deploy or deploy would more accurately reflect the job's responsibilities.

📝 Suggested naming improvement
 jobs:
-  build:
+  build-and-deploy:
     runs-on: ubuntu-latest

Alternatively, you could split this into two jobs (build and deploy) if you want to separate concerns, though that may be overkill for documentation deployment.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/deploy-docs.yml at line 24, Rename the GitHub Actions job
currently labeled "build" to a more descriptive name that reflects both building
and deployment (e.g., "build-and-deploy" or "deploy"); update any references to
the job id in the workflow (job dependencies, uses, needs, or outputs) so
"build" is replaced consistently, or alternatively split the single "build" job
into two jobs named "build" and "deploy" connected via needs to separate
concerns while preserving existing steps and artifact handoff.
docs/concepts/architecture.md (1)

28-32: Consider rephrasing for readability.

The static analysis tool flagged three consecutive sentences starting with "It" (lines 28-32 in the numbered list). While grammatically correct, varying sentence structure slightly improves flow.

✍️ Suggested rephrase
 1. OpenRTC resolves the target agent from job metadata, room metadata, or the
    first registered agent.
 2. It creates an `AgentSession` using the selected agent configuration.
-3. It injects prewarmed VAD and turn detection models from `proc.userdata`.
-4. It starts the resolved agent instance and connects the LiveKit job context.
+3. Prewarmed VAD and turn detection models are injected from `proc.userdata`.
+4. The resolved agent instance is started and the LiveKit job context is connected.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/concepts/architecture.md` around lines 28 - 32, Rewrite the three
consecutive sentences that begin with "It" in the numbered list so they vary
sentence starters and improve readability: keep the same facts but rephrase
lines describing creation of AgentSession, injection of prewarmed VAD and turn
detection models from proc.userdata, and starting the resolved agent and
connecting the LiveKit job context (references: AgentSession, proc.userdata,
LiveKit job context). For example, start one sentence with the action ("Create
an AgentSession..."), another with the injected resource ("Prewarmed VAD and
turn detection models are injected from proc.userdata..."), and the last with
the outcome or actor ("The resolved agent instance is then started and connected
to the LiveKit job context...") to avoid three back-to-back "It" openings.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/.vitepress/config.ts`:
- Around line 1-58: The build fails because VitePress is ESM-only; update your
project package.json to declare ESM by adding a top-level "type": "module" field
so Node treats imports (and docs/.vitepress/config.ts) as ESM; ensure
package.json includes "type": "module" and then run the build to confirm no
remaining CommonJS/require usages need converting.
- Around line 43-48: Update the hardcoded GitHub URLs to point to the correct
repository: change the socialLinks entry (icon 'github') link from
'https://github.com/mahimailabs/openrtc' to
'https://github.com/mahimairaja/openrtc-python' and update the editLink.pattern
from 'https://github.com/mahimailabs/openrtc/edit/main/docs/:path' to
'https://github.com/mahimairaja/openrtc-python/edit/main/docs/:path' so the
socialLinks and editLink in the config.ts reflect the actual repo.

In `@docs/api/pool.md`:
- Line 95: Update the LLM model identifier used in the example by replacing the
incorrect string value "openai/gpt-4.1-mini" assigned to the llm parameter with
the correct OpenAI model identifier "gpt-4o-mini" (i.e., change the llm
assignment in the example snippet).

In `@docs/getting-started.md`:
- Around line 36-38: Replace the invalid model identifier "openai/gpt-4.1-mini"
with a current OpenAI model name (recommended "gpt-5.4-mini") across all
occurrences; specifically update the llm setting string (e.g.,
llm="openai/gpt-4.1-mini" or just "gpt-4.1-mini") in docs/getting-started.md,
tests/test_pool.py, both places in examples/main.py, and docs/api/pool.md so
they consistently use "gpt-5.4-mini" (or "openai/gpt-5.4-mini" if your codebase
prefixes provider names).

---

Nitpick comments:
In @.github/workflows/deploy-docs.yml:
- Around line 34-43: Update the GitHub Actions workflow to enable npm caching in
the Node setup step: modify the actions/setup-node@v4 invocation (the step with
node-version: '20') to include cache: 'npm' and cache-dependency-path pointing
to package-lock.json (or yarn.lock), and ensure the "Install dependencies" step
(named "Install dependencies") still runs npm install so the cache is
restored/updated automatically; this uses the built-in caching of
actions/setup-node to speed subsequent builds.
- Line 24: Rename the GitHub Actions job currently labeled "build" to a more
descriptive name that reflects both building and deployment (e.g.,
"build-and-deploy" or "deploy"); update any references to the job id in the
workflow (job dependencies, uses, needs, or outputs) so "build" is replaced
consistently, or alternatively split the single "build" job into two jobs named
"build" and "deploy" connected via needs to separate concerns while preserving
existing steps and artifact handoff.

In @.github/workflows/docs.yml:
- Around line 34-35: Replace the "Install dependencies" step's run command from
`npm install` to `npm ci` to ensure clean, reproducible installs based on
package-lock.json (look for the step named "Install dependencies"); additionally
add a caching step using actions/cache (e.g., before that step) to cache Node.js
dependencies (cache key derived from package-lock.json and node-version, cache
paths such as ~/.npm or ~/.npm/_cacache or node_modules depending on strategy)
so CI runs are faster and deterministic.

In `@docs/concepts/architecture.md`:
- Around line 28-32: Rewrite the three consecutive sentences that begin with
"It" in the numbered list so they vary sentence starters and improve
readability: keep the same facts but rephrase lines describing creation of
AgentSession, injection of prewarmed VAD and turn detection models from
proc.userdata, and starting the resolved agent and connecting the LiveKit job
context (references: AgentSession, proc.userdata, LiveKit job context). For
example, start one sentence with the action ("Create an AgentSession..."),
another with the injected resource ("Prewarmed VAD and turn detection models are
injected from proc.userdata..."), and the last with the outcome or actor ("The
resolved agent instance is then started and connected to the LiveKit job
context...") to avoid three back-to-back "It" openings.

In `@docs/index.md`:
- Around line 22-28: Add a link to the CLI docs in the "Read the docs" list
under the "Read the docs" heading by inserting an entry for "CLI" (e.g., the
link text "CLI" pointing to the same path used in the sidebar such as
./reference/cli) so the list (Getting Started, Architecture, AgentPool API,
Examples, CLI, GitHub Pages deployment) matches the sidebar's "Reference"
inclusion.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 71e4686e-4a25-424c-9ea5-41fc6b8fa3a2

📥 Commits

Reviewing files that changed from the base of the PR and between 87a4eb1 and 1135049.

⛔ Files ignored due to path filters (1)
  • docs/public/logo.svg is excluded by !**/*.svg
📒 Files selected for processing (11)
  • .github/workflows/deploy-docs.yml
  • .github/workflows/docs.yml
  • docs/.vitepress/config.ts
  • docs/api/pool.md
  • docs/cli.md
  • docs/concepts/architecture.md
  • docs/deployment/github-pages.md
  • docs/examples.md
  • docs/getting-started.md
  • docs/index.md
  • package.json

Comment thread docs/.vitepress/config.ts
Comment thread docs/.vitepress/config.ts
Comment thread docs/api/pool.md Outdated
"restaurant",
RestaurantAgent,
stt="deepgram/nova-3:multi",
llm="openai/gpt-4.1-mini",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

What is the correct model identifier for OpenAI's GPT-4 mini model as of March 2026?

💡 Result:

The correct model identifier for OpenAI's GPT-4o mini model (commonly referred to as GPT-4 mini) is "gpt-4o-mini". This is confirmed by official OpenAI API documentation pages dedicated to the model, listing it as the primary alias along with snapshots like "gpt-4o-mini-2024-07-18". Although some pages for the model return "Page not found" (suggesting possible deprecation or archival in ChatGPT contexts post-February 2026), the main model documentation remains accessible, and deprecation notices explicitly state no changes to API availability as of March 2026. No evidence of a "gpt-4-mini" identifier exists; "gpt-4o-mini" is the standard.

Citations:


Update the LLM model identifier to the correct value.

The example uses "openai/gpt-4.1-mini", but the correct OpenAI model identifier is "gpt-4o-mini". Change the code to:

Suggested fix
    llm="openai/gpt-4o-mini",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/api/pool.md` at line 95, Update the LLM model identifier used in the
example by replacing the incorrect string value "openai/gpt-4.1-mini" assigned
to the llm parameter with the correct OpenAI model identifier "gpt-4o-mini"
(i.e., change the llm assignment in the example snippet).

Comment thread docs/getting-started.md
Comment on lines +36 to +38
stt="deepgram/nova-3:multi",
llm="openai/gpt-4.1-mini",
tts="cartesia/sonic-3",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if this model identifier pattern is used consistently across the codebase
rg -n "gpt-4.1-mini" --type py --type md

Repository: mahimairaja/openrtc-python

Length of output: 345


🌐 Web query:

OpenAI current model names gpt-4 mini 2025

💡 Result:

As of March 19, 2026, OpenAI's current flagship models are from the GPT-5.4 family, including gpt-5.4 (flagship for complex reasoning and coding), gpt-5.4-mini (strong mini model for coding, computer use, and subagents), and gpt-5.4-nano (cheapest for simple high-volume tasks). These are recommended in official docs for starting points, with knowledge cutoff Aug 31, 2025. Older models like GPT-4o mini (released July 2024) are legacy and largely retired from ChatGPT by February 2026, though some may remain in API. No model named "gpt-4 mini" exists; the query likely refers to GPT-4o mini or the new gpt-5.4-mini. Other active models include o-series like o3 and o4-mini for reasoning, and specialized ones for image/video/audio.

Citations:


🏁 Script executed:

# Check framework docs or README for explanation of model identifier format
cat README.md | head -50

Repository: mahimairaja/openrtc-python

Length of output: 209


🏁 Script executed:

# Look for any documentation or comments explaining the model naming convention
rg -n "gpt-4o-mini|gpt-4-turbo|model.*identifier" --type md --type py | head -20

Repository: mahimairaja/openrtc-python

Length of output: 52


Update model identifier to a valid OpenAI model name.

The identifier openai/gpt-4.1-mini is not a valid OpenAI model. Current models include gpt-5.4-mini (recommended), or legacy gpt-4o-mini. Update this identifier in docs/getting-started.md:37 and also in tests/test_pool.py:21, examples/main.py:14 and examples/main.py:22, and docs/api/pool.md:95 for consistency.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/getting-started.md` around lines 36 - 38, Replace the invalid model
identifier "openai/gpt-4.1-mini" with a current OpenAI model name (recommended
"gpt-5.4-mini") across all occurrences; specifically update the llm setting
string (e.g., llm="openai/gpt-4.1-mini" or just "gpt-4.1-mini") in
docs/getting-started.md, tests/test_pool.py, both places in examples/main.py,
and docs/api/pool.md so they consistently use "gpt-5.4-mini" (or
"openai/gpt-5.4-mini" if your codebase prefixes provider names).

@mahimairaja mahimairaja merged commit 339199a into main Mar 19, 2026
7 checks passed
@mahimairaja mahimairaja deleted the feat/plan-documentation-for-openrtc-package branch March 23, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant