Skip to content

refactor(www): SDK-first website refresh#627

Open
MaanavD wants to merge 1 commit intomainfrom
website-sdk-refresh
Open

refactor(www): SDK-first website refresh#627
MaanavD wants to merge 1 commit intomainfrom
website-sdk-refresh

Conversation

@MaanavD
Copy link
Copy Markdown
Collaborator

@MaanavD MaanavD commented Apr 10, 2026

Summary

Foundry Local is now delivered as a native SDK (~20 MB) that ships inside your app. The website still led with CLI install commands (winget install + foundry model run), which framed it as a CLI tool. This PR updates the website to reflect the SDK-first positioning.

Changes

Hero / Install Command (install-command.svelte)

  • Replaced the 2-step CLI flow (winget installfoundry model run) with tabbed SDK install commands (Python / JS / C# / Rust)
  • Each tab shows the correct pip install / npm install / dotnet add package / cargo add command
  • Copying the install command reveals a per-language hello-world code snippet showing the full lifecycle: init → catalog → download → load → chat

Features Section (features.svelte)

  • Fixed the "Ship to Production" code example: was showing manager.getCatalog().getModel('gpt-oss-20b') (wrong API, fake model). Now shows correct SDK pattern: catalog.getModel('qwen2.5-0.5b') with download()load()createChatClient()completeChat()
  • Updated feature descriptions to mention EP management, ~20 MB runtime, native SDK + optional REST server

Download Dropdown (download-dropdown.svelte)

  • Fixed Rust package name: cargo add foundry-localcargo add foundry-local-sdk
  • Added WinML variants section for Windows with all 4 languages (-winml packages)

Docs Links (all files)

  • Fixed broken links: azure/ai-foundry/foundry-local/azure/foundry-local/ across hero, nav, footer, and config

Messaging Updates (config.ts, footer.svelte)

  • Updated site description and footer tagline to reflect SDK-first positioning
  • Updated feature card descriptions

Verification

  • svelte-check: 18 errors before, 18 errors after (all pre-existing in UI library types, zero introduced)

Not included (separate repo: MicrosoftDocs/azure-ai-docs)

A docs discrepancy audit found 14 issues in the Learn docs. Key items:

  • Python samples wrap synchronous SDK in asyncio.run() (4 pages)
  • Streaming code uses chunk.choices[0].message.content instead of delta.content (2 pages)
  • "Foundry Local CLI" framing on pages that also apply to the SDK (3 pages)
  • Landing page meta description is generic Azure AI boilerplate

Full audit available on request.

- Hero: Replace CLI install (winget/brew + foundry model run) with
  tabbed SDK install commands (pip/npm/dotnet/cargo) and per-language
  hello-world code snippets that show the full lifecycle
- Features: Fix code example from wrong API (getCatalog().getModel('gpt-oss-20b'))
  to correct SDK pattern (catalog.getModel('qwen2.5-0.5b') + download/load/chat)
- Download dropdown: Fix Rust package (foundry-local -> foundry-local-sdk),
  add WinML variants for all languages (pip/npm/dotnet/cargo)
- Fix all docs links from azure/ai-foundry/foundry-local/ to azure/foundry-local/
- Update footer tagline to SDK-era messaging
- Update config description and feature descriptions to reflect
  SDK-first positioning, ~20 MB runtime, EP management

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 10, 2026 17:43
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
foundry-local Ready Ready Preview, Comment Apr 10, 2026 5:44pm

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refreshes the Foundry Local website messaging and examples to position Foundry Local as an SDK-first product (vs. a CLI-first flow), and updates installation/docs links accordingly.

Changes:

  • Replaced the hero “two-step CLI” install flow with tabbed per-language SDK install commands and copy-to-reveal hello-world snippets.
  • Updated homepage feature copy + the “Ship to Production” example to match current SDK patterns and a real model alias.
  • Updated the download dropdown with correct Rust crate name and added WinML-specific install options; fixed Learn docs URLs across the site.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
www/src/lib/config.ts Updates site description, feature card copy, and Learn docs URLs to SDK-first messaging.
www/src/lib/components/install-command.svelte Introduces tabbed SDK install commands + per-language hello-world snippet reveal/copy.
www/src/lib/components/home/hero.svelte Fixes primary Learn docs link to new /azure/foundry-local/ path.
www/src/lib/components/home/footer.svelte Updates footer tagline and Learn docs link to SDK-first messaging + new docs path.
www/src/lib/components/home/features.svelte Updates feature descriptions and replaces example code with current SDK usage + real model alias.
www/src/lib/components/download-dropdown.svelte Fixes Rust crate name, adds WinML install variants for all languages, and refines labels.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +37 to +46
csharp: `using Microsoft.AI.Foundry.Local;
await FoundryLocalManager.CreateAsync(
new Configuration { AppName = "my-app" });
var catalog = await FoundryLocalManager.Instance.GetCatalogAsync();
var model = await catalog.GetModelAsync("qwen2.5-0.5b");
await model.DownloadAsync(); await model.LoadAsync();
var client = await model.GetChatClientAsync();
var res = await client.CompleteChatAsync(new[] {
new ChatMessage { Role="user", Content="Hello!" }});
Console.WriteLine(res.Choices![0].Message.Content);`,
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

The C# hello-world snippet calls FoundryLocalManager.CreateAsync without the required ILogger parameter. In the current SDK, CreateAsync requires both a Configuration and an ILogger (e.g., NullLogger.Instance) before Instance/GetCatalogAsync can be used.

Copilot uses AI. Check for mistakes.
let manager = FoundryLocalManager::create(
FoundryLocalConfig::new("my-app"))?;
let model = manager.catalog().get_model("qwen2.5-0.5b").await?;
model.download(None).await?; model.load().await?;
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

The Rust snippet uses model.download(None).await?, but download is generic over the progress callback type (Option<F>). Passing bare None won’t compile because Rust can’t infer F; the snippet should specify the None type (or pass a typed closure) so it’s runnable.

Suggested change
model.download(None).await?; model.load().await?;
model.download(None::<fn(u64, u64)>).await?; model.load().await?;

Copilot uses AI. Check for mistakes.
{modelCommand}
</code>
<!-- Copy Button -->
<pre class="overflow-x-auto p-3 font-mono text-[10px] leading-relaxed text-gray-300 sm:text-xs"><code>{codeSnippets[activeTab]}</code></pre>
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

The code snippet block uses text-gray-300 on a bg-background/50 container, which will be very low-contrast in light mode (gray on white). Consider using text-foreground/text-muted-foreground or switching the snippet container to a dark background to maintain readable contrast.

Suggested change
<pre class="overflow-x-auto p-3 font-mono text-[10px] leading-relaxed text-gray-300 sm:text-xs"><code>{codeSnippets[activeTab]}</code></pre>
<pre class="text-foreground overflow-x-auto p-3 font-mono text-[10px] leading-relaxed sm:text-xs"><code>{codeSnippets[activeTab]}</code></pre>

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants