> Full Neon documentation index: https://neon.com/docs/llms.txt

# Neon Realtime in public beta, new AI Gateway models, Stripe real-time sync, CJK search in Lakebase Search, and more

## Neon Realtime is in public beta

Neon now has realtime, built by the team behind [Electric](https://neon.com/blog/electric-joins-neon). [Neon Realtime](https://neon.com/docs/realtime/overview) turns any SQL query into a live query. Subscribe to it and the result stays up to date as your data changes. That makes your whole app reactive, with no polling or refetch logic.

It runs directly from Lakebase Postgres, and it works with scale to zero and branching. Out of the box you get [type-safe, end-to-end reactivity](https://neon.com/docs/realtime/guides/reactivity), [SSR support](https://neon.com/docs/realtime/guides/ssr), and [instant local writes](https://neon.com/docs/realtime/guides/mutations).

[Watch on YouTube](https://youtube.com/watch?v=DgdKM5SHG8M)

To see what it can do, try one of the live demo apps:

- [1 Million Boxes](https://one-million-boxes.vercel.app): the world's largest game of dots and boxes, with every move synced to everyone playing
- [Hacker News Realtime](https://hackernews-realtime.vercel.app): watch Hacker News scores, comment counts, and rankings change as they happen
- [Neonbricks](https://neonbricks-app.vercel.app): build a brick model together, or ask the AI to build one for you

The source code is available from our [Realtime examples](https://neon.com/docs/realtime/examples/overview) page.

Agents can install the Realtime skill with `neon skills -s neon-realtime`, or use the [Neon MCP Server](https://neon.com/docs/ai/neon-mcp-server).

To try it yourself, enable Realtime and subscribe to a query:

```bash
neon realtime enable
neon realtime subscribe "SELECT * FROM items"
```

The [Realtime quickstart](https://neon.com/docs/realtime/quickstart) walks through the full setup, or you can start from a template with `neon bootstrap my-app --template realtime-react`.

During the beta, Realtime is available in AWS `us-east-1`, `us-east-2`, `eu-central-1`, and `ap-southeast-1`. See the [Realtime FAQ](https://neon.com/docs/realtime/overview#frequently-asked-questions) for what's in the beta. Give it a try and tell us what you think on [Discord](https://neon.com/discord).

## New models in the AI Gateway

We've added 11 models to the [AI Gateway](https://neon.com/docs/ai-gateway/overview), including new releases from Anthropic, OpenAI, Google, and xAI:

- **Anthropic:** `claude-sonnet-5-5`, `claude-haiku-5-5`
- **OpenAI:** `gpt-6-sol`, `gpt-6-luna`, `gpt-6-1-sol`
- **Google:** `gemini-3-7-flash`, `gemini-3-8-flash`
- **xAI:** `grok-4-7`
- **Open-weight models:** `deepseek-v4-1-flash`, `glm-5-3` (Zhipu AI), `bge-large-en` (BAAI embedding model)

If you haven't used the AI Gateway yet, it gives you one endpoint and one Neon credential for models from many providers, so you don't need a separate account or API key for each one. The chat completions endpoint is OpenAI-compatible, so the OpenAI SDK and other standard clients work by changing the base URL. To switch models, change the `model` field:

```typescript
const client = new OpenAI({
  apiKey: process.env.NEON_AI_GATEWAY_TOKEN,
  baseURL: `${process.env.NEON_AI_GATEWAY_BASE_URL}/v1`,
});

const response = await client.chat.completions.create({
  model: 'claude-sonnet-5-5',
  messages: [{ role: 'user', content: 'Hello!' }],
});
```

The AI Gateway is available on the Launch and Scale plans with [prepaid credits](https://neon.com/docs/ai-gateway/prepaid-credits), which give you access to every model in the catalog. To get started, follow the [AI Gateway quickstart](https://neon.com/docs/ai-gateway/get-started). The [model catalog](https://neon.com/docs/ai-gateway/overview#available-models) lists all supported models.

## Sync Stripe data to Neon in real time

**Stripe Data Pipeline** can now stream your Stripe data straight into Postgres, and Neon is one of the destinations you can pick in the Stripe Dashboard. Stripe backfills your existing data and keeps it in sync as payments, subscriptions, and customers change, so you don't need webhook handlers or Stripe API calls to keep your copy current.

The data lands in the same database as your app, so checking whether a user has an active subscription is a join:

```sql
select s.status
from users u
join stripe.subscriptions s on s.customer = u.stripe_customer_id
where u.id = $1
  and s.status in ('active', 'trialing');
```

Real-time sync to Postgres is in public preview, and you can try it for free. To set it up, add a Neon pipeline from the **Data Pipeline** page in the Stripe Dashboard, choose your Neon project, and pick the tables to sync. To learn more, read [Sync Stripe data in real-time to Neon](https://neon.com/blog/stripe-data-pipeline-realtime-sync-to-postgres), or see the [Stripe docs](https://docs.stripe.com/data/data-pipeline/real-time-sync-to-postgres).

## Managed Better Auth upgraded to Better Auth 1.7

[Managed Better Auth](https://neon.com/docs/auth/overview), Neon's managed authentication service built on the open-source [Better Auth](https://www.better-auth.com/) library, now runs Better Auth 1.7.6. Your existing apps keep working with no changes. Sessions, cookies, and JWTs are unaffected, and older SDK versions are still supported.

We've also released new SDK versions built on Better Auth 1.7.6: `@neondatabase/auth` 0.6.0-beta, `@neondatabase/neon-js` 0.8.0-beta, and `@neondatabase/auth-ui` 0.4.0-beta.

If you use a Better Auth client of your own with Managed Better Auth, use Better Auth 1.7 or later.

**Upgrade note:** With the new SDKs, `accountInfo`, `unlinkAccount`, `getAccessToken`, and `refreshToken` identify a linked account by its local account `id`, as returned by `listAccounts()`, instead of the provider's account ID. They no longer accept `providerId`. If you call these methods directly, update your code:

```ts
const { data: accounts } = await authClient.listAccounts();
const google = accounts.find((a) => a.providerId === 'google');
await authClient.accountInfo({ query: { accountId: google.id } });
```

**Known issue:** In `@neondatabase/auth-ui` 0.4.0-beta, the Providers settings card can't unlink an account or show the provider email. A fix is in progress.

## Chinese, Japanese, and Korean full-text search in Lakebase Search

[Lakebase Search](https://neon.com/docs/ai/lakebase-search) now supports keyword search over Chinese, Japanese, and Korean (CJK) text. These languages don't put spaces between words, so Postgres's built-in full-text search can't split them into search terms. The [`lakebase_tokenizer`](https://neon.com/docs/extensions/lakebase-tokenizer) extension now does that for you, with ready-to-use `tokenizer_chinese`, `tokenizer_japanese`, and `tokenizer_korean` configurations:

```sql
CREATE EXTENSION IF NOT EXISTS lakebase_tokenizer;

SELECT to_tsvector('tokenizer_japanese', '関西国際空港に行きました');
-- '国際':2 '空港':3 '行く':4 '関西':1
```

The output is a standard `tsvector`, so it works with GIN indexes and with [`lakebase_text`](https://neon.com/docs/extensions/lakebase-text) for BM25 ranking. CJK support ships in `lakebase_tokenizer` 0.2.0. If you're already using the extension, run `ALTER EXTENSION lakebase_tokenizer UPDATE;`. Your existing configurations and indexes don't need to change. See [CJK text](https://neon.com/docs/extensions/lakebase-tokenizer#cjk-text) for more examples.

## Fixes & improvements

<details>

<summary>**Neon MCP Server**</summary>

- You can now choose which Postgres role the [Neon MCP Server](https://neon.com/docs/ai/neon-mcp-server) uses for SQL. Set `roleName` (for example, `https://mcp.neon.tech/mcp?readonly=true&roleName=app_reader`) and every SQL tool logs in as that role instead of the database owner, so the role's grants decide what your agent can read and change. With OAuth and the plain `https://mcp.neon.tech/mcp` URL, enter the role in the optional **Postgres role** field on the authorization page. When you set a role, the `get_connection_string` tool is turned off, so your agent can't get around the role by connecting as the database owner. See [Postgres role](https://neon.com/docs/ai/neon-mcp-server#postgres-role).
- `run_sql_transaction` is no longer available in [read-only mode](https://neon.com/docs/ai/neon-mcp-server#read-only-mode), because it could be used to write data. Use `run_sql` for read queries.

</details>

<details>

<summary>**Neon CLI and SDKs**</summary>

- [`neon psql`](https://neon.com/docs/cli/psql) now passes arguments after `--` to psql exactly as typed. Before, the CLI changed number-like values on the way through (`1.50` became `1.5` and `1e3` became `1000`), and if you didn't have psql installed, the CLI's built-in psql could crash on them. The fix also applies to `--psql` on `neon connection-string`, `neon branches create`, and `neon projects create`.
- `@neon/env` 1.6.2: `parseEnv` no longer fails with a "`NEON_FUNCTION_<SLUG>_BASE_URL` is missing" error inside deployed functions, which broke any function whose `neon.ts` declares functions. `env.functions` is now optional, so write `env.functions?.hello.baseUrl` instead of `env.functions.hello.baseUrl`. See [Type-safe environment variables](https://neon.com/docs/reference/neon-ts#type-safe-environment-variables).

</details>
