Skip to content

Commit 29710dd

Browse files
authored
Merge pull request #616 from Portkey-AI/migration/02-quick-wins
Model Catalog Migration 2/7: Quick Wins - Minor Updates
2 parents 3ad9865 + 8c81da9 commit 29710dd

30 files changed

Lines changed: 947 additions & 169 deletions

PR_SPLIT_PLAN.md

Lines changed: 334 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,334 @@
1+
# PR Split Plan for Model Catalog Migration
2+
3+
## Summary
4+
5+
Splitting PR #597 (191 files) into **7 focused PRs** organized by:
6+
1. **Change complexity** - How much review effort needed
7+
2. **Content type** - What pattern to look for
8+
3. **Risk level** - How critical to get right
9+
10+
---
11+
12+
## PR 1: Foundation & Migration Context
13+
**Files:** 7 | **Risk:** 🟢 Low | **Review time:** ~10 min
14+
15+
**What changed:** New documentation files explaining the migration strategy.
16+
17+
**Reviewer focus:** _"Is the migration strategy sound? Are patterns documented clearly?"_
18+
19+
```
20+
GROUP_2_MIGRATION_PLAN.md (new)
21+
GROUP_3_MIGRATION_PLAN.md (new)
22+
GROUP_5_MIGRATION_PLAN.md (new)
23+
MASTER_MIGRATION_GUIDE.md (new)
24+
WRITING_STYLE_GUIDE.md (new)
25+
docs.json (nav cleanup)
26+
images/claude-icon.svg (new asset)
27+
```
28+
29+
**Merge first** - Provides context for all other PRs.
30+
31+
---
32+
33+
## PR 2: Quick Wins - Minor Terminology Updates
34+
**Files:** 29 | **Risk:** 🟢 Low | **Review time:** ~15 min
35+
36+
**What changed:** Small updates (<30 lines) - terminology fixes, link updates, minor code tweaks.
37+
38+
**Reviewer focus:** _"Are Virtual Key → Provider terminology updates correct?"_
39+
40+
```
41+
# API Reference (3 files)
42+
api-reference/inference-api/authentication.mdx (+4)
43+
api-reference/sdk/c-sharp.mdx (+25/-21)
44+
api-reference/sdk/node.mdx (+7/-10)
45+
46+
# Config & Changelog (2 files)
47+
changelog/2025/apr.mdx (+1/-1)
48+
enterprise/hybrid2.mdx (+6/-5)
49+
50+
# Guides - Minor fixes (6 files)
51+
guides/getting-started/a-b-test-prompts-and-models.mdx
52+
guides/getting-started/function-calling.mdx
53+
guides/getting-started/return-repeat-requests-from-cache.mdx
54+
guides/getting-started/trigger-automatic-retries-on-llm-failures.mdx
55+
guides/ted-ai-hack-24.mdx
56+
guides/use-cases/openai-computer-use.mdx
57+
guides/use-cases/smart-fallback-with-model-optimized-prompts.mdx
58+
guides/use-cases/track-costs-using-metadata.mdx
59+
60+
# Integrations - Minor fixes (11 files)
61+
integrations/agents/agno-ai.mdx
62+
integrations/agents/autogen.mdx
63+
integrations/agents/langgraph.mdx
64+
integrations/agents/livekit.mdx
65+
integrations/agents/openai-swarm.mdx
66+
integrations/agents/pydantic-ai.mdx
67+
integrations/libraries/anthropic-computer-use.mdx
68+
integrations/libraries/dspy.mdx
69+
70+
# LLM Providers - Minor fixes (7 files)
71+
integrations/llms/azure-openai/azure-openai.mdx
72+
integrations/llms/bedrock/aws-bedrock.mdx
73+
integrations/llms/bedrock/batches.mdx
74+
integrations/llms/bedrock/files.mdx
75+
integrations/llms/bedrock/prompt-caching.mdx
76+
integrations/llms/byollm.mdx
77+
```
78+
79+
**Can rubber-stamp** - All follow same simple pattern.
80+
81+
---
82+
83+
## PR 3: LLM Provider Integrations
84+
**Files:** 5 | **Risk:** 🟡 Medium | **Review time:** ~20 min
85+
86+
**What changed:** Provider setup instructions rewritten to use Model Catalog pattern.
87+
88+
**Reviewer focus:** _"Do all providers follow the same 'Add Provider' pattern? Are code examples using `@provider/model` format?"_
89+
90+
```
91+
integrations/llms/ai21.mdx (+116/-75)
92+
integrations/llms/anthropic.mdx (+449/-1152) ⚠️ Major rewrite
93+
integrations/llms/anyscale-llama2-mistral-zephyr.mdx (+115/-314)
94+
integrations/llms/aws-sagemaker.mdx (+149/-143)
95+
integrations/llms/azure-foundry.mdx (+225/-227)
96+
```
97+
98+
**Pattern to verify:**
99+
- [ ] "Add Provider" section uses 4-step flow
100+
- [ ] Code examples use `model="@provider-slug/model-name"`
101+
- [ ] Links point to `/product/model-catalog`
102+
103+
---
104+
105+
## PR 4: AI Tools & Apps (Cursor, Cline, Claude Code, etc.)
106+
**Files:** 24 | **Risk:** 🟡 Medium | **Review time:** ~30 min
107+
108+
**What changed:** Setup instructions for AI coding tools updated to Model Catalog.
109+
110+
**Reviewer focus:** _"Are setup steps consistent across all AI tools? Do base URLs and configs match?"_
111+
112+
```
113+
# AI Coding Tools (Major rewrites)
114+
integrations/libraries/cursor.mdx (+107/-341)
115+
integrations/libraries/cline.mdx (+141/-334)
116+
integrations/libraries/claude-code.mdx (+125/-236)
117+
integrations/libraries/codex.mdx (+131/-282)
118+
integrations/libraries/github-copilot.mdx (+105/-207)
119+
integrations/libraries/goose.mdx (+134/-296)
120+
integrations/libraries/roo-code.mdx (+143/-298)
121+
integrations/libraries/zed.mdx (+150/-284)
122+
123+
# AI Platforms
124+
integrations/libraries/anythingllm.mdx (+135/-278)
125+
integrations/libraries/janhq.mdx (+130/-279)
126+
integrations/libraries/librechat.mdx (+100/-292)
127+
integrations/libraries/openwebui.mdx (+159/-457)
128+
129+
# Low-code/No-code
130+
integrations/libraries/langflow.mdx (+110/-333)
131+
integrations/libraries/n8n.mdx (+105/-337)
132+
integrations/libraries/tooljet.mdx (+84/-250)
133+
134+
# Databases & Testing
135+
integrations/libraries/mindsdb.mdx (+47/-40)
136+
integrations/libraries/mongodb.mdx (+34/-32)
137+
integrations/libraries/supabase.mdx (+55/-51)
138+
integrations/libraries/promptfoo.mdx (+67/-160)
139+
140+
# Other
141+
integrations/libraries/instructor.mdx (+107/-133)
142+
integrations/libraries/openai-compatible.mdx (+189/-354)
143+
integrations/libraries/openai-agent-builder.mdx (+158/-693)
144+
integrations/libraries/openai-agent-builder-python.mdx (+152/-689)
145+
```
146+
147+
**Pattern to verify:**
148+
- [ ] Base URL consistently `https://api.portkey.ai/v1`
149+
- [ ] Provider setup uses Model Catalog flow
150+
- [ ] Headers include `x-portkey-api-key`
151+
152+
---
153+
154+
## PR 5: Framework Integrations (LangChain, LlamaIndex, Vercel)
155+
**Files:** 4 | **Risk:** 🟠 Higher | **Review time:** ~25 min
156+
157+
**What changed:** Core framework integrations - these are heavily used, code examples critical.
158+
159+
**Reviewer focus:** _"Are code examples correct and tested? Do imports match current SDK versions?"_
160+
161+
```
162+
integrations/libraries/langchain-python.mdx (+371/-275) ⚠️ Heavy use
163+
integrations/libraries/langchain-js.mdx (+377/-181) ⚠️ Heavy use
164+
integrations/libraries/llama-index-python.mdx (+273/-714) ⚠️ Heavy use
165+
integrations/libraries/vercel.mdx (+171/-187)
166+
```
167+
168+
**Pattern to verify:**
169+
- [ ] Import statements are correct
170+
- [ ] Portkey initialization matches current SDK
171+
- [ ] All code examples are runnable
172+
- [ ] Provider slug format `@provider/model` used correctly
173+
174+
---
175+
176+
## PR 6: Agent Frameworks
177+
**Files:** 10 | **Risk:** 🟡 Medium | **Review time:** ~25 min
178+
179+
**What changed:** Agent framework integrations (CrewAI, Strands, OpenAI Agents, etc.)
180+
181+
**Reviewer focus:** _"Are multi-agent patterns documented correctly? Do tracing examples work?"_
182+
183+
```
184+
# Major rewrites
185+
integrations/agents/openai-agents.mdx (+284/-997) ⚠️ Major
186+
integrations/agents/openai-agents-ts.mdx (+244/-741) ⚠️ Major
187+
integrations/agents/crewai.mdx (+145/-632)
188+
integrations/agents/strands.mdx (+150/-506)
189+
integrations/agents/llama-agents.mdx (+92/-190)
190+
integrations/agents/langchain-agents.mdx (+105/-166)
191+
192+
# Medium changes
193+
integrations/agents/bring-your-own-agents.mdx (+84/-132)
194+
integrations/agents/control-flow.mdx (+79/-135)
195+
integrations/agents/phidata.mdx (+81/-126)
196+
197+
# Cleanup
198+
integrations/agents/strands-backup.mdx (deleted)
199+
```
200+
201+
**Pattern to verify:**
202+
- [ ] Agent initialization uses Portkey client correctly
203+
- [ ] Tracing/observability setup is documented
204+
- [ ] Multi-provider configs use new format
205+
206+
---
207+
208+
## PR 7: Guides & Tutorials
209+
**Files:** 21 | **Risk:** 🟡 Medium | **Review time:** ~30 min
210+
211+
**What changed:** Step-by-step guides and tutorials updated for Model Catalog flow.
212+
213+
**Reviewer focus:** _"Does the user journey make sense? Are screenshots/examples current?"_
214+
215+
```
216+
# Getting Started (Major)
217+
guides/getting-started/getting-started-with-ai-gateway.mdx (+584/-998) ⚠️ Core guide
218+
guides/getting-started/101-on-portkey-s-gateway-configs.mdx (+40/-99)
219+
guides/getting-started/image-generation.mdx (+34/-112)
220+
guides/getting-started/llama-3-on-groq.mdx (+27/-67)
221+
guides/getting-started/tackling-rate-limiting.mdx (+25/-49)
222+
223+
# Integration Guides
224+
guides/integrations/groq.mdx (+40/-193)
225+
guides/integrations/vercel-ai.mdx (+50/-163)
226+
guides/integrations/arize-portkey.mdx (+31/-46)
227+
guides/integrations/langchain.mdx (+32/-64)
228+
guides/integrations/llama-3-on-portkey-+-together-ai.mdx (+9/-33)
229+
guides/integrations/mixtral-8x22b.mdx (+19/-79)
230+
231+
# Use Cases
232+
guides/use-cases/setup-openai-greater-than-azure-openai-fallback.mdx (+47/-159)
233+
guides/use-cases/build-an-article-suggestion-app-with-supabase-pgvector-and-portkey.mdx
234+
guides/use-cases/comparing-top10-lmsys-models-with-portkey.mdx
235+
guides/use-cases/deepseek-r1.mdx
236+
guides/use-cases/enforcing-json-schema-with-anyscale-and-together.mdx
237+
guides/use-cases/fallback-from-sdxl-to-dall-e-3.mdx
238+
guides/use-cases/few-shot-prompting.mdx
239+
guides/use-cases/how-to-use-openai-sdk-with-portkey-prompt-templates.mdx
240+
guides/use-cases/librechat-web-search.mdx
241+
guides/use-cases/run-portkey-on-prompts-from-langchain-hub.mdx
242+
243+
# Prompts
244+
guides/prompts/build-a-chatbot-using-portkeys-prompt-templates.mdx
245+
guides/prompts/llama-prompts.mdx
246+
```
247+
248+
**Pattern to verify:**
249+
- [ ] Step numbers match actual UI
250+
- [ ] Code snippets use new `@provider/model` format
251+
- [ ] Links to Model Catalog are correct
252+
253+
---
254+
255+
## Recommended Merge Order
256+
257+
```
258+
1. PR 1: Foundation → Sets context, no risk
259+
2. PR 2: Quick Wins → Builds momentum, easy reviews
260+
3. PR 3: LLM Providers → Core functionality
261+
4. PR 5: Frameworks → High-traffic pages (review carefully!)
262+
5. PR 4: AI Tools → Broad but consistent pattern
263+
6. PR 6: Agents → Growing adoption
264+
7. PR 7: Guides → Can iterate post-merge
265+
```
266+
267+
---
268+
269+
## Creating the PRs
270+
271+
### Option A: Cherry-pick from current branch
272+
273+
```bash
274+
# For each PR, create a branch and cherry-pick relevant files
275+
git checkout main
276+
git pull origin main
277+
git checkout -b migration/01-foundation
278+
279+
# Copy specific files from the migration branch
280+
git checkout modal-catalog-migration -- \
281+
GROUP_2_MIGRATION_PLAN.md \
282+
GROUP_3_MIGRATION_PLAN.md \
283+
GROUP_5_MIGRATION_PLAN.md \
284+
MASTER_MIGRATION_GUIDE.md \
285+
WRITING_STYLE_GUIDE.md \
286+
docs.json \
287+
images/claude-icon.svg
288+
289+
git add -A
290+
git commit -m "docs: Add Model Catalog migration foundation"
291+
gh pr create --title "Model Catalog Migration 1/7: Foundation" --body "..."
292+
```
293+
294+
### Option B: Use git subtree split (if commits are organized)
295+
296+
If your commits are already organized by group (which they appear to be from git log), you can create PRs by commit ranges.
297+
298+
---
299+
300+
## PR Description Template
301+
302+
Use this template for each PR:
303+
304+
```markdown
305+
## Model Catalog Migration - [Category Name]
306+
307+
### What's changing
308+
[Brief description of the changes in this PR]
309+
310+
### Files changed
311+
- X files in `[directory]`
312+
- Change type: [terminology updates / code examples / full rewrite]
313+
314+
### Review checklist
315+
- [ ] "Add Provider" sections follow 4-step pattern
316+
- [ ] Code examples use `@provider-slug/model-name` format
317+
- [ ] Links point to `/product/model-catalog`
318+
- [ ] Backwards compatibility note included where `virtual_key` still works
319+
320+
### Testing
321+
- [ ] Verified links work
322+
- [ ] Code examples are syntactically correct
323+
324+
### Part of
325+
Model Catalog Migration (#597) - Split for easier review
326+
```
327+
328+
---
329+
330+
## Questions?
331+
332+
- **Why 7 PRs?** Balance between review overhead and focus. Each PR is ~15-30 min review.
333+
- **Can we merge out of order?** PRs 2-7 can merge in any order after PR 1.
334+
- **What about conflicts?** Each PR touches different files, so conflicts are unlikely.

api-reference/inference-api/authentication.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ To ensure secure access to Portkey's APIs, authentication is required for all re
1414

1515
Based on your access level, you might see the relevant permissions on the API key modal - tick the ones you'd like, name your API key, and save it.
1616

17+
18+
1719
<Card title="JWT-based Authentication" href="#jwt-based-authentication">
1820
You can also authenticate Portkey using JWT Tokens. Learn more here
1921
</Card>

0 commit comments

Comments
 (0)