Skip to content

Commit 8efa8a5

Browse files
authored
fix(shell-docs): critical-path content fixes — imports, links, model names, premium walkthrough (CopilotKit#4497)
## Summary Critical-path content fixes from the shell-docs QA triage. Fixes everything that breaks copy-paste or click-through on existing pages. **Items addressed:** - 2.2, 8.1, 13.1, 13.2 — code-block import hygiene - 12.1, 14.1, 15.1, 15.2, 22.1 — cross-page link sweep - 9.1, 9.2 — `gpt-5.2*` → `gpt-5.4*` sweep + extend model-name CI validator - 7.1 — `migrations.enabled` premium walkthrough corrections ## Visual inspection 1. Start the dev server: ```bash nx run shell-docs:dev ``` Open http://localhost:3003. 2. **Imports — copy-paste check.** Visit each page below; copy each `route.ts` / `app/layout.tsx` / `app/page.tsx` block into a scratch TypeScript file and verify it has all needed imports: - `/built-in-agent/quickstart` (BIA, default integration — should now import `CopilotKit` from `@copilotkit/react-core/v2`) - `/agent-spec/quickstart` - `/microsoft-agent-framework/quickstart` - Switch framework picker to each of: `langgraph`, `mastra`, `pydantic-ai`, `adk`, `agno`, `aws-strands`, `llamaindex`. Re-check the same blocks. - `/auth`, `/agentic-protocols/mcp`, `/backend/copilot-runtime`, `/multimodal-attachments` — verify code blocks now show import lines. 3. **Links — click-through check.** On each page below, click every external link in the prose: - `/agentic-protocols` (the index — 7 link rewrites; all should resolve) - `/multimodal-attachments` (the migration Callout should be GONE) - `/faq` ("What's available?" table — the rows should be plain bold labels, not links) - `/langgraph/agent-app-context` (mid-prose link should now point at langgraph fw page, not BIA) - `/inspector` (the agent-app-context relative link should resolve to langgraph fw page) - `/troubleshooting/common-issues` (the `copilot-runtime` and `model-selection` links should now resolve) 4. **Model names — search check.** In the dev server (or via grep), confirm `gpt-5.2` and `gpt-5.2-mini` no longer appear anywhere in `showcase/shell-docs/src/content/`. All references should now be `gpt-5.4` / `gpt-5.4-mini`. 5. **Premium walkthrough — read-through.** Walk `/premium/self-hosting` end to end as if installing fresh. The walkthrough should now tell you to set `migrations.enabled: true` BEFORE the install command. The "Job will appear as Completed" prose should only fire if migrations were enabled. 6. **Anti-checks (these should NOT have changed):** - The legitimate `gpt-4o`, `gpt-4.1`, `gpt-5.4` references in JSDoc / source code. - Code blocks where imports were intentionally omitted because a prior block on the same page established them. - Reference pages under `/reference/v1/` (those are owned by a separate PR).
2 parents 2068148 + 9099aa5 commit 8efa8a5

67 files changed

Lines changed: 195 additions & 92 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

scripts/validate-doc-model-names.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ interface Violation {
2222

2323
const DOCS_DIR = path.resolve(__dirname, "../docs");
2424
const ALLOWLIST_PATH = path.join(DOCS_DIR, "model-allowlist.json");
25+
// Additional roots to scan. The main legacy Nextra tree under `docs/` is the
26+
// primary canonical home, but the new shell-docs surface (`showcase/shell-docs/`)
27+
// is now also authored content and must obey the same allowlist.
28+
const EXTRA_DOCS_DIRS = [
29+
path.resolve(__dirname, "../showcase/shell-docs/src/content"),
30+
];
2531

2632
// Provider prefixes stripped before matching (e.g. "openai/gpt-4o" -> "gpt-4o")
2733
const PROVIDER_PREFIXES = [
@@ -274,6 +280,10 @@ function main() {
274280
}
275281

276282
const violations = validateFiles(DOCS_DIR, ALLOWLIST_PATH);
283+
for (const extra of EXTRA_DOCS_DIRS) {
284+
if (!fs.existsSync(extra)) continue;
285+
violations.push(...validateFiles(extra, ALLOWLIST_PATH));
286+
}
277287

278288
if (violations.length === 0) {
279289
console.log("All model names in docs are valid.");

showcase/shell-docs/src/content/docs/agentic-protocols/index.mdx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Learn about these protocols and how to connect your app to agents which support
7575
verticalAlign: "top",
7676
}}
7777
>
78-
<a href="./ag-ui-protocol">
78+
<a href="/agentic-protocols/ag-ui">
7979
<strong>AG-UI</strong>
8080
</a>
8181
<br />
@@ -103,7 +103,7 @@ Learn about these protocols and how to connect your app to agents which support
103103
verticalAlign: "top",
104104
}}
105105
>
106-
<a href="./connect-mcp-servers">
106+
<a href="/agentic-protocols/mcp">
107107
<strong>MCP</strong>
108108
</a>
109109
<br />
@@ -131,7 +131,7 @@ Learn about these protocols and how to connect your app to agents which support
131131
verticalAlign: "top",
132132
}}
133133
>
134-
<a href="./a2a-protocol">
134+
<a href="/agentic-protocols/a2a">
135135
<strong>A2A</strong>
136136
</a>
137137
<br />
@@ -147,16 +147,15 @@ Learn about these protocols and how to connect your app to agents which support
147147
<strong>Agent ↔ Generative UI </strong>
148148
</td>
149149
<td style={{ padding: "12px", verticalAlign: "top" }}>
150-
<strong>[A2UI](./generative-ui/specs/a2ui)</strong> (Google)
150+
<strong>[A2UI](/generative-ui/a2ui)</strong> (Google)
151151
<br />
152-
<strong>[MCP Apps](./generative-ui/specs/mcp-apps)</strong> (MCP
152+
<strong>[MCP Apps](/generative-ui/mcp-apps)</strong> (MCP
153153
Ecosystem)
154154
<br />
155-
<strong>[Open-JSON-UI](./generative-ui/specs/open-json-ui)</strong>{" "}
156-
(OpenAI)
155+
<strong>Open-JSON-UI</strong> (OpenAI)
157156
</td>
158157
<td style={{ padding: "12px" }}>
159-
Declarative, LLM-friendly [generative UI specs](./generative-ui/specs)
158+
Declarative, LLM-friendly [generative UI specs](/generative-ui)
160159
that define <em>what</em> to render and how to structure agent responses
161160
visually. CopilotKit fully supports all of these.
162161
</td>

showcase/shell-docs/src/content/docs/agentic-protocols/mcp.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ For further reading, check out the [Model Context Protocol](https://modelcontext
102102
```tsx
103103
"use client";
104104

105+
import { CopilotKit } from "@copilotkit/react-core/v2";
105106

106107
export default function App() {
107108
return (
@@ -120,6 +121,8 @@ For further reading, check out the [Model Context Protocol](https://modelcontext
120121
```tsx
121122
"use client";
122123

124+
import { useEffect } from "react";
125+
import { useCopilotKit } from "@copilotkit/react-core/v2";
123126

124127
function McpServerManager() {
125128
const { setMcpServers } = useCopilotKit();
@@ -148,6 +151,7 @@ For further reading, check out the [Model Context Protocol](https://modelcontext
148151
```tsx
149152
"use client";
150153

154+
import { CopilotChat } from "@copilotkit/react-core/v2";
151155

152156
export default function ChatInterface() {
153157
return (
@@ -169,6 +173,7 @@ For further reading, check out the [Model Context Protocol](https://modelcontext
169173
```tsx
170174
"use client";
171175

176+
import {
172177
useFrontendTool,
173178
CatchAllActionRenderProps,
174179
} from "@copilotkit/react-core/v2";
@@ -195,6 +200,7 @@ For further reading, check out the [Model Context Protocol](https://modelcontext
195200
```tsx
196201
"use client";
197202

203+
import { CopilotKit, CopilotChat } from "@copilotkit/react-core/v2";
198204

199205
export default function Page() {
200206
return (
@@ -331,10 +337,12 @@ For detailed implementation guidance, refer to the [official MCP SDK documentati
331337
Here's a basic example of configuring the runtime:
332338

333339
```tsx
340+
import {
334341
CopilotRuntime,
335342
OpenAIAdapter,
336343
copilotRuntimeNextJSAppRouterEndpoint,
337344
} from "@copilotkit/runtime";
345+
import { NextRequest } from "next/server";
338346

339347
const serviceAdapter = new OpenAIAdapter();
340348

showcase/shell-docs/src/content/docs/auth.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ If you don't need any of those, skip auth entirely. The agent runs anonymously a
2525
Pass your token via the `headers` prop on `<CopilotKit>`. CopilotKit forwards every request with that header attached.
2626

2727
```tsx title="frontend/src/app/page.tsx"
28+
import { CopilotKit } from "@copilotkit/react-core/v2";
29+
2830
<CopilotKit
2931
runtimeUrl="/api/copilotkit"
3032
headers={{
@@ -82,6 +84,8 @@ export const GET = (req: NextRequest) => handler(req);
8284
Pass your token via the `properties` prop. CopilotKit forwards it to LangGraph as a Bearer token automatically.
8385

8486
```tsx title="frontend/src/app/page.tsx"
87+
import { CopilotKit } from "@copilotkit/react-core/v2";
88+
8589
<CopilotKit
8690
runtimeUrl="/api/copilotkit"
8791
properties={{
@@ -185,6 +189,8 @@ async def my_agent_node(state: AgentState, config: RunnableConfig):
185189
Pass your token via the `properties` prop. CopilotKit forwards it to AG2's `/chat` endpoint as a request header.
186190

187191
```tsx title="frontend/src/app/page.tsx"
192+
import { CopilotKit } from "@copilotkit/react-core/v2";
193+
188194
<CopilotKit
189195
runtimeUrl="/api/copilotkit"
190196
properties={{
@@ -210,7 +216,7 @@ from autogen.ag_ui import AGUIStream, RunAgentInput
210216
agent = ConversableAgent(
211217
name="assistant",
212218
system_message="You are a helpful assistant.",
213-
llm_config=LLMConfig({"model": "gpt-5.2-mini"}),
219+
llm_config=LLMConfig({"model": "gpt-5.4-mini"}),
214220
)
215221

216222
stream = AGUIStream(agent)
@@ -268,6 +274,8 @@ def get_account_data(
268274
Microsoft Agent Framework's AG-UI host expects authentication on a request header rather than the runtime properties channel. Pass the token via `<CopilotKit headers={...}>`:
269275

270276
```tsx title="frontend/src/app/page.tsx"
277+
import { CopilotKit } from "@copilotkit/react-core/v2";
278+
271279
<CopilotKit
272280
runtimeUrl="/api/copilotkit"
273281
headers={{

showcase/shell-docs/src/content/docs/backend/copilot-runtime.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ export const POST = async (req: NextRequest) => {
4040
Then point your frontend at the endpoint:
4141

4242
```tsx
43+
import { CopilotKitProvider } from "@copilotkit/react-core/v2";
44+
4345
<CopilotKitProvider runtimeUrl="/api/copilotkit">
4446
<YourApp />
4547
</CopilotKitProvider>
@@ -59,6 +61,8 @@ The runtime supports multiple agent types. `BuiltInAgent` is the primary agent c
5961
If you register an agent under the name `"default"`, CopilotKit's prebuilt UI components will use it automatically without any additional configuration on the frontend. This is useful when you have one primary agent and don't want to specify an `agentId` everywhere.
6062

6163
```ts title="app/api/copilotkit/route.ts"
64+
import { BuiltInAgent } from "@copilotkit/runtime/v2";
65+
6266
const runtime = new CopilotRuntime({
6367
agents: {
6468
// This agent is used automatically by CopilotPopup, CopilotSidebar, etc.
@@ -111,6 +115,8 @@ a2ui: { agents: ["my-agent"] }
111115
On the frontend, the A2UI renderer activates automatically — no extra configuration needed. If you want to override the default theme, pass an `a2ui` prop to `<CopilotKitProvider>`:
112116

113117
```tsx
118+
import { CopilotKitProvider } from "@copilotkit/react-core/v2";
119+
114120
<CopilotKitProvider runtimeUrl="/api/copilotkit" a2ui={{ theme: myCustomTheme }}>
115121
{children}
116122
</CopilotKitProvider>
@@ -139,6 +145,7 @@ CopilotKit is built on the [AG-UI protocol](./ag-ui), which is an open standard.
139145

140146
```tsx
141147
import { HttpAgent } from "@ag-ui/client";
148+
import { CopilotKitProvider } from "@copilotkit/react-core/v2";
142149

143150
const myAgent = new HttpAgent({
144151
url: "https://my-agent.example.com",

showcase/shell-docs/src/content/docs/faq.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,29 +38,29 @@ We've got answers to some common questions!
3838
Beautiful, powerful and customizable chat components just an import away.
3939
| | |
4040
|---------|-------------|
41-
| [**Chat**](/reference/v1/components/chat/CopilotChat) | Simple and powerful chat interface |
42-
| [**Pop-up**](/reference/v1/components/chat/CopilotPopup) | The Chat component in a pop-up format |
43-
| [**Sidebar**](/reference/v1/components/chat/CopilotSidebar) | The Chat component in a sidebar format |
44-
| [**Copilot Textarea**](/reference/v1/components/CopilotTextarea) | Powerful AI autocompletion as a drop-in replacement for any textarea |
41+
| **Chat** | Simple and powerful chat interface |
42+
| **Pop-up** | The Chat component in a pop-up format |
43+
| **Sidebar** | The Chat component in a sidebar format |
44+
| **Copilot Textarea** | Powerful AI autocompletion as a drop-in replacement for any textarea |
4545
| [**Headless**](/custom-look-and-feel/slots) | Full customization of the chat interfaces |
4646

4747
### Deeply integrated Copilots
4848
Give Copilots the ability to execute tools directly in your application.
4949
| | |
5050
|---------|-------------|
51-
| [**Copilot Readable State**](/reference/v1/hooks/useCopilotReadable) | Enables Copilots to read and understand the application state |
52-
| [**Frontend Tools**](/reference/v1/hooks/useFrontendTool) | Copilots can execute tools in the application |
51+
| **Copilot Readable State** | Enables Copilots to read and understand the application state |
52+
| **Frontend Tools** | Copilots can execute tools in the application |
5353
| [**Generative UI**](/generative-ui/your-components/display-only) | Render any component in the copilot chat interface |
54-
| [**AI Autosuggestions**](/reference/v1/hooks/useCopilotChatSuggestions) | AI-powered autosuggestions in your AI chat interface |
55-
| [**Copilot Tasks**](/reference/v1/classes/CopilotTask) | Let your copilots execute tools proactively based on application state |
54+
| **AI Autosuggestions** | AI-powered autosuggestions in your AI chat interface |
55+
| **Copilot Tasks** | Let your copilots execute tools proactively based on application state |
5656

5757
### Rich agentic experiences
5858
Integrate your LangChain agents into your product with ease.
5959
| | |
6060
|---------|-------------|
61-
| [**Deep support for LangChain**](/langgraph/quickstart) | Bring your LangChain agents directly into your product |
62-
| [**Human-in-the-loop**](/langgraph/human-in-the-loop) | Allow your users to work with your agents to solve complex problems |
63-
| [**Shared state**](/langgraph/shared-state) | Render the state of your LangChain agents with less than 10 lines of code |
61+
| **Deep support for LangChain** | Bring your LangChain agents directly into your product |
62+
| **Human-in-the-loop** | Allow your users to work with your agents to solve complex problems |
63+
| **Shared state** | Render the state of your LangChain agents with less than 10 lines of code |
6464

6565
</Accordion>
6666
<Accordion title="How does it all work?">

showcase/shell-docs/src/content/docs/inspector.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The **CopilotKit Inspector** is a built-in debugging overlay that sits on top of
2424
| **Available Agents** | Which agents CopilotKit has discovered via `/info` and which one is currently active. |
2525
| **Agent State** | The current `agent.state` tree, rerendered as it updates. Great for debugging [shared state](./shared-state) flows. |
2626
| **Frontend Tools** | Every tool registered via `useFrontendTool`, `useComponent`, `useHumanInTheLoop`, or `useRenderTool`, along with its parameter schema. |
27-
| **Context** | The [`useAgentContext`](./agent-app-context) entries the agent currently receives, plus any document context you've attached. |
27+
| **Context** | The [`useAgentContext`](/langgraph-python/agent-app-context) entries the agent currently receives, plus any document context you've attached. |
2828

2929
## When should I use it?
3030

showcase/shell-docs/src/content/docs/integrations/adk/quickstart.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,13 @@ Before you begin, you'll need the following:
221221
Create an API route to connect CopilotKit to your ADK agent:
222222

223223
```tsx title="app/api/copilotkit/route.ts"
224+
import {
224225
CopilotRuntime,
225226
ExperimentalEmptyAdapter,
226227
copilotRuntimeNextJSAppRouterEndpoint,
227228
} from "@copilotkit/runtime";
229+
import { HttpAgent } from "@ag-ui/client";
230+
import { NextRequest } from "next/server";
228231

229232
const serviceAdapter = new ExperimentalEmptyAdapter();
230233

@@ -251,6 +254,9 @@ Before you begin, you'll need the following:
251254
Wrap your application with the CopilotKit provider:
252255

253256
```tsx title="app/layout.tsx"
257+
import { CopilotKit } from "@copilotkit/react-core/v2"; // [!code highlight]
258+
import "@copilotkit/react-ui/v2/styles.css"; // [!code highlight]
259+
import './globals.css';
254260

255261
// ...
256262

@@ -274,6 +280,7 @@ Before you begin, you'll need the following:
274280
Add the CopilotSidebar component to your page:
275281

276282
```tsx title="app/page.tsx"
283+
import { CopilotSidebar } from "@copilotkit/react-core/v2"; // [!code highlight]
277284

278285
export default function Page() {
279286
return (

showcase/shell-docs/src/content/docs/integrations/ag2/frontend-tools.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Without frontend actions, agents are limited to just processing and returning da
103103
agent = ConversableAgent(
104104
name="assistant",
105105
system_message="You are a helpful assistant.",
106-
llm_config=LLMConfig({"model": "gpt-5.2-mini"}),
106+
llm_config=LLMConfig({"model": "gpt-5.4-mini"}),
107107
)
108108

109109
stream = AGUIStream(agent)

showcase/shell-docs/src/content/docs/integrations/ag2/generative-ui/state-rendering.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ is a situation where a user and an agent are working together to solve a problem
7171
"You are a helpful assistant for storing searches. "
7272
"Use `add_search` once per query, then call `run_searches`."
7373
),
74-
llm_config=LLMConfig({"model": "gpt-5.2-mini"}),
74+
llm_config=LLMConfig({"model": "gpt-5.4-mini"}),
7575
)
7676

7777

0 commit comments

Comments
 (0)