# ElizaOS Developer Update (2026-01-04 → 2026-01-10)

## 1) Core Framework

### Unified client/runtime messaging surface (multi-transport)
Core client + server messaging were aligned around a single “transport” concept across HTTP (sync), SSE (streaming), and WebSocket (async). This work introduces a unified hook surface and fixes a long-standing “double/triple processing” problem caused by overlapping persistence + bus emission paths.

- PR: **Unified hooks w/ multi-transport support** (HTTP/SSE/WebSocket) — [elizaOS/eliza#6300](https://github.com/elizaOS/eliza/pull/6300)
  - New `useElizaChat` hook (and transport-specific hooks).
  - Server endpoint param renamed **`mode` → `transport`** (legacy `mode` still accepted but deprecated).
  - Fix: emit to internal bus only where appropriate (not “always”), preventing duplicate handling.

### Connector/gateway scaling direction: “event pumps”
Core-dev discussion converged on moving connectors toward *simple event pumps* and scaling via **multiple daemon instances per service** (rather than single “mega gateways”). Voice connectors were called out as needing higher priority/bandwidth handling than text, with preprocessing as an important optimization layer.

- Reference implementation to review: **Jeju Discord gateway** (cloud v2 branch) — https://github.com/elizaOS/eliza-cloud-v2/tree/jeju/apps/discord-gateway  
- Discord thread context: core-devs channel discussions (2026-01-06/07)

### Cloud reliability and runtime init optimization (in progress)
Ongoing cloud work focused on addressing TOCTOU (time-of-check/time-of-use) race conditions (notably around credit deduction for streaming endpoints), using a “**deduct-before, reconcile-after**” pattern. Runtime initialization optimizations are being tested and tracked via Linear tickets.

- Discussion context: core-devs standup notes (2026-01-06/07)

---

## 2) New Features

### `useElizaChat`: one hook for HTTP + SSE + WebSocket clients
Developers building frontends can now standardize on a single hook, swapping transports without rewriting application logic.

- PR: [elizaOS/eliza#6300](https://github.com/elizaOS/eliza/pull/6300)

Example (client-side):

```ts
import { useElizaChat } from "@elizaos/client";

const { messages, sendMessage, loading, error } = useElizaChat({
  agentId,
  transport: "sse", // "http" | "sse" | "websocket"
  onMessageAdded: (m) => console.log("new message", m.id),
  onError: (e) => console.error(e),
});

// send a user message
await sendMessage({ text: "Hello from SSE" });
```

### Extensible Discord slash commands (plugin-discord)
Discord slash commands were confirmed to be **extensible**, enabling teams to add commands without forking the core plugin logic.

- Issue: “Make slash commands extensible / restore join/leave” — [elizaos-plugins/plugin-discord#15](https://github.com/elizaos-plugins/plugin-discord/issues/15)

### Unified Messaging API adoption in social plugins (WIP)
Telegram + Discord plugins are being updated to align with ElizaOS unified messaging semantics.

- Discord plugin PR (unified API: `handleMessage`): [elizaos-plugins/plugin-discord#41](https://github.com/elizaos-plugins/plugin-discord/pull/41)
- Telegram plugin PR (unified API work): [elizaos-plugins/plugin-telegram#22](https://github.com/elizaos-plugins/plugin-telegram/pull/22)

---

## 3) Bug Fixes (critical + developer-impacting)

### (Critical) Discord “No server ID found 10” in core v1.7.0
**Symptom:** Discord bot runs but fails to resolve server context; bootstrap plugin throws `"No server ID found 10"`, `room.serverId` undefined.  
**Root cause:** incomplete migration from `serverId` → `messageServerId` across bootstrap actions/providers, causing compatibility break with `plugin-discord@1.3.3`.  
**Fix:** bootstrap + sql minor updates to consistently use `messageServerId`.

- Fix PR (merged): [elizaOS/eliza#6333](https://github.com/elizaOS/eliza/pull/6333)
- Recommended workaround while waiting for downstream plugin releases/testing:
  - Temporarily downgrade core to **v1.6.5**, or
  - Test Odilitime’s branch **`odi-17`** (Discord discussions 2026-01-06/07)

### (Critical) PGLite failures when enabling unavailable extensions
**Symptom:** plugin-sql attempts to enable `pgcrypto` even under PGLite, causing startup/migration errors in embedded/local environments.  
**Fix:** skip `pgcrypto` extension for PGLite.

- PR (merged during the period): [elizaOS/eliza#6339](https://github.com/elizaOS/eliza/pull/6339)

### (Critical) `SET LOCAL` parameterization breaks Postgres in data isolation mode
**Symptom:** `ENABLE_DATA_ISOLATION=true` causes `syntax error at or near $1` because Postgres `SET` does not accept parameterized statements the way Drizzle was emitting them.  
**Fix:** use `sql.raw()` for `SET LOCAL`.

- PR (merged): [elizaOS/eliza#6316](https://github.com/elizaOS/eliza/pull/6316)

### (High) plugin-sql stability: pool config, error handling, and PGLite shutdown safety
**Symptom:** runtime crashes due to pool misconfiguration (infinite connection waits, missing error handler) and unsafe `null as T` return paths during PGLite shutdown.  
**Fixes:**
- Production-grade pool defaults (timeouts, keepalive, min/max).
- Pool `'error'` handler to avoid Node crashes on dead idle conns.
- PGLite adapter throws explicit error on shutdown instead of returning null-cast.

- PR (merged): [elizaOS/eliza#6323](https://github.com/elizaOS/eliza/pull/6323)

### (Dev UX) Destructive migration blocking on repeat runs
If you are iterating locally and see migrations blocked due to column drops (e.g., `agent_id`, `room_id`), you can explicitly allow destructive migrations in dev:

```bash
ELIZA_ALLOW_DESTRUCTIVE_MIGRATIONS=true elizaos start
```

Discord context: developer support thread (2026-01-06).

---

## 4) API Changes (developer-visible)

### `mode` → `transport` (server messaging endpoints)
Server messaging endpoints are standardizing terminology:
- New: `transport = "http" | "sse" | "websocket"`
- Legacy: `mode` still supported but **deprecated**.

- PR: [elizaOS/eliza#6300](https://github.com/elizaOS/eliza/pull/6300)

Example (REST call pattern):

```bash
curl -X POST "$ELIZA_BASE_URL/api/messaging/sessions/$SESSION_ID/messages?transport=sse" \
  -H "content-type: application/json" \
  -d '{"text":"stream this"}'
```

### Room/world context field migration: `serverId` → `messageServerId`
Affects plugins and any custom code reading room/world identifiers from message context.

- Fix PR: [elizaOS/eliza#6333](https://github.com/elizaOS/eliza/pull/6333)

---

## 5) Social Media Integrations (Twitter/Telegram/Discord/Farcaster)

### Discord
- Core v1.7.0 + `plugin-discord@1.3.3` incompatibility (server ID migration): fixed in core via [#6333](https://github.com/elizaOS/eliza/pull/6333), but **requires coordinated testing** across Discord branches before cutting a Discord plugin release.
- Plugin API alignment (deprecated `sendMessage` → `handleMessage`): [plugin-discord#41](https://github.com/elizaos-plugins/plugin-discord/pull/41)
- Release blocker under investigation: publishing pipeline failure preventing `v1.3.4` release:
  - Issue: [elizaos-plugins/plugin-discord#40](https://github.com/elizaos-plugins/plugin-discord/issues/40)

### Telegram
- Unified messaging API work: [plugin-telegram#22](https://github.com/elizaos-plugins/plugin-telegram/pull/22)
- Crash bug identified for certain photo uploads:
  - Issue: [elizaos-plugins/plugin-telegram#23](https://github.com/elizaos-plugins/plugin-telegram/issues/23)

*(No Farcaster-specific updates were surfaced in this week’s aggregated discussions.)*

---

## 6) Model Provider Updates (OpenAI/Anthropic/DeepSeek/etc.)

### Cloud agent API: model naming requires provider prefix
Developers integrating elizaoscloud agents reported `"Model not found"` when passing bare model names. The correct format is:

- `openai/gpt-4o-mini`
- `anthropic/claude-sonnet-4.5`
- `google/gemini-2.5-flash`

Discord context: coders channel Q/A (2026-01-06/07).

Example request body:

```json
{
  "agentId": "აგენტ-id",
  "model": "openai/gpt-4o-mini",
  "input": "Hello"
}
```

### Embeddings delegation gotcha (Anthropic + MCP)
If using Anthropic for chat completions but you see:
`No handler found for delegate type: TEXT_EMBEDDING`

Current workaround discussed: include an OpenAI embedding provider after Anthropic (even a placeholder key value was mentioned as sufficient in some setups). This indicates hidden embedding-dependency coupling that is a candidate for cleanup.

Discord context: (2026-01-05) developer support thread.

---

## 7) Breaking Changes / Migration Warnings (V1 → V2 / 1.6.x → 1.7.x)

### WARNING: `serverId` → `messageServerId` migration impact
Even though [#6333](https://github.com/elizaOS/eliza/pull/6333) is framed as a compatibility fix, downstream developers may experience this as breaking if they:
- Read `room.serverId` or `world.serverId` directly
- Log/emit events keyed on `serverId`
- Maintain custom bootstrap actions/providers copied from older versions

**Action:** update custom code to consume `messageServerId` and ensure any persisted metadata keys match the new name.

### WARNING: messaging endpoint param rename (`mode` deprecated)
If you have clients calling messaging endpoints with `mode=sync|stream`, migrate to `transport=http|sse`. Legacy mapping exists, but new code should use `transport`.

- PR: [#6300](https://github.com/elizaOS/eliza/pull/6300)

### WARNING: plugin-sql behavior change on PGLite shutdown
`PgliteDatabaseAdapter.withDatabase()` now **throws** on shutdown instead of returning `null as T` (which previously caused hard-to-debug crashes downstream). If you were relying on the old behavior (you shouldn’t), add explicit shutdown guards.

- PR: [#6323](https://github.com/elizaOS/eliza/pull/6323)

### WARNING: destructive migrations gated by env var
Repeat runs in dev may require:

```bash
ELIZA_ALLOW_DESTRUCTIVE_MIGRATIONS=true
```

Treat this as **dev-only** unless you have an explicit migration strategy for production.