Sr. Content Developer at Microsoft, working remotely in PA, TechBash conference organizer, former Microsoft MVP, Husband, Dad and Geek.
154821 stories
·
33 followers

Episode 106: Trader Joe's Finds the Goat - in Wisconsin

1 Share

Sometimes, a discussion about The GOAT can be polarizing. Whether it's an athlete, a writer, an actor, a musician, or any other professional, judging the Greatest Of All Time is an inherently subjective endeavor. When it comes to cheese, though, it's easier, especially when GOAT is in the actual name of the cheese. In this episode of Inside Trader Joe's, we talk to our resident cheese expert about Goat Cheese, and we travel to Wisconsin to talk to the folks who start with goat's milk from local farmers and make the chevre magic happen. It's a blaaaaast!

Transcript (PDF)





Download audio: https://traffic.libsyn.com/secure/insidetjs/Trader_Joes_Finds_the_GOAT_-_In_Wisconsin.mp3?dest-id=704103
Read the whole story
alvinashcraft
just a second ago
reply
Pennsylvania, USA
Share this story
Delete

517: Plan First, Think Less: Save Tokens, Improve Code

1 Share

Episode 517 starts with a light chat about AI avatars and new text‑to‑speech deepfakes before diving into LLM “thinking” modes—what baked‑in planning actually does, why it multiplies token costs, and when it helps or hurts. James and Frank give concrete dev advice: try low‑thinking settings, use big models for creative planning then smaller ones to execute, leverage harnesses/system prompts, and beware quantized local models often do better without thinking.

Follow Us

⭐⭐ Review Us ⭐⭐

Machine transcription available on http://mergeconflict.fm

Support Merge Conflict





Download audio: https://aphid.fireside.fm/d/1437767933/02d84890-e58d-43eb-ab4c-26bcc8524289/6a035890-617e-4247-8c58-0a12788b2f39.mp3
Read the whole story
alvinashcraft
just a second ago
reply
Pennsylvania, USA
Share this story
Delete

Claude Code on Microsoft Foundry in VS Code — A Practical Setup Guide (with the gotchas)

1 Share

 Enables enterprise-grade governance without changing your developer workflow.

The official Microsoft Learn article (Configure Claude Code for Microsoft Foundry) gets you ~80% of the way there. The remaining 20%—VS Code settings shape, tenant mismatches, and configuration conflicts like "baseURL and resource are mutually exclusive"—is where most setups fail in practice.

This guide walks the full path end-to-end, with the exact JSON that validates, working CLI configuration, and a troubleshooting matrix based on real-world failures. This guidance is based on repeated customer deployments and internal testing across both CLI and VS Code scenarios.


TL;DR

Setup - Deploy claude-sonnet-4-6 (optionally Haiku + Opus) in a supported region - Grant Cognitive Services User + Foundry User - az login --tenant <tenant>, then launch VS Code via code .

Config - CLI: - CLAUDE_CODE_USE_FOUNDRY=1 - ANTHROPIC_FOUNDRY_RESOURCE=<name> - Do NOT set ANTHROPIC_FOUNDRY_BASE_URL at the same time - VS Code: - Use [{ "name": "...", "value": "..." }] format

Validate - claude → /status - Expect: API provider: Microsoft Foundry


Why run Claude Code on Foundry?

Anthropic's Claude Code is a top-tier agentic coding assistant. Running it through Microsoft Foundry instead of Anthropic's public API gives you:

  • Data residency & compliance: prompts and completions stay inside your Azure tenant.
  • Entra ID auth: no API keys to rotate; centralized RBAC.
  • Private networking: works behind VNets/Private Endpoints.
  • Unified billing & quotas: usage shows up on your Azure invoice and in Foundry monitoring.

Same model, same CLI, enterprise-grade plumbing underneath.


Prerequisites checklist

RequirementHow to verify
Azure subscription with pay-as-you-go billingaz account show
Foundry resource in supported regionsCheck your region's model availability in Foundry portal
Contributor/Owner on the resource group (for deployments)Azure Portal → IAM
Cognitive Services User + Foundry User on the resource (for invoking)Azure Portal → IAM
Azure CLI installed and logged inaz --version, az login
Claude Code CLI installedclaude --version
VS Code (current) with the Anthropic Claude Code extensionHelp → About
Windows only: Git Bash (from Git for Windows) or WSL2 — Claude Code's runtime requires a POSIX shellbash --version in Git Bash / WSL

⚠️ Claude models in Foundry are currently available in select regions. Check the Foundry portal model catalog for your region's availability (commonly East US 2 and Sweden Central).


Step 1 — Deploy the Claude models

Claude Code uses three model roles, and it expects a deployment for each:

RoleDefault deployment nameUsed for
Primaryclaude-sonnet-4-6general coding (balanced)
Fastclaude-haiku-4-5quick edits, file reads
Extended thinkingclaude-opus-4-6complex reasoning

Deploy at least Sonnet to get started. Add Haiku and Opus when you need them — Claude Code will route automatically. If a role-specific model isn't deployed, Claude Code may fall back or fail depending on the task.

Deployment names in this guide follow the current Claude 4.x naming exposed in Foundry. Exact versions change over time — check the Foundry model catalog in your region for what's currently available.

Foundry Portal: AI Foundry → your project → Build → Models + endpoints+ Deploy model → pick the Anthropic Claude model → Global Standard deployment → name it exactly as above (or remember the name to override later).

To discover the current model version before deploying (replace eastus2 with your Foundry region):

az cognitiveservices model list -l eastus2 `
  --query "[?contains(model.name,'claude')].{name:model.name, version:model.version, format:model.format}" -o table

Azure CLI:

az cognitiveservices account deployment create `
  --name <foundry-resource> `
  --resource-group <rg> `
  --deployment-name claude-sonnet-4-6 `
  --model-name claude-sonnet-4-6 `
  --model-version <version> `
  --model-format Anthropic `
  --sku-name GlobalStandard `
  --sku-capacity 1

✍️ Figure 1: Foundry portal “Models + endpoints” showing the three Claude deployments.

Three Claude model deployments in the Foundry portal


Step 2 — Grant yourself the right roles

This is the #1 source of silent failures. You need both:

RoleRole IDPurpose
Cognitive Services Usera97b65f3-24c7-4388-baec-2e87135dc908data-plane invocation
Foundry User (formerly Azure AI User)53ca6127-db72-4b80-b1b0-d745d6d5456dFoundry-native permissions
$me = az ad signed-in-user show --query id -o tsv
$scope = az cognitiveservices account show -n <foundry-resource> -g <rg> --query id -o tsv

# Use role IDs — rename-proof (works whether the display name is "Azure AI User" or "Foundry User")
az role assignment create --assignee $me --role a97b65f3-24c7-4388-baec-2e87135dc908 --scope $scope  # Cognitive Services User
az role assignment create --assignee $me --role 53ca6127-db72-4b80-b1b0-d745d6d5456d --scope $scope  # Foundry User (formerly Azure AI User)

The Foundry RBAC rename (Azure AI User → Foundry User) is rolling out; both role names map to the same role definition (same role ID), depending on tenant rollout state. Use whichever role name your tenant exposes — or use the role IDs above to avoid ambiguity.


Step 3 — Install the Claude Code CLI

Use the official installer from Anthropic (auto-updates in the background):

irm https://claude.ai/install.ps1 | iex
claude --version

If claude isn't on PATH, restart your shell. The installer drops it under %USERPROFILE%\.local\bin.


Step 4 — Sign in to the right tenant

If your Foundry resource lives in a tenant different from your default, an az login to the wrong tenant produces the cryptic error:

ValueError: Unable to get authority configuration for
https://login.microsoftonline.com/<bad-guid>.
Authority would typically be in a format of
https://login.microsoftonline.com/your_tenant

Fix:

az login --tenant <foundry-tenant-guid>
az account set --subscription <foundry-subscription-guid>
az account show   # confirm tenant & subscription

💡 You can list every tenant you have access to with: az account list --query "[].{name:name, tenantId:tenantId}" -o table


Step 5 — Configure the CLI

Set these in the same PowerShell session you'll launch claude from:

$env:CLAUDE_CODE_USE_FOUNDRY     = "1"
$env:ANTHROPIC_FOUNDRY_RESOURCE  = "<your-foundry-resource-name>"

# Optional: only if your deployment names differ from the defaults
$env:ANTHROPIC_DEFAULT_SONNET_MODEL = "claude-sonnet-4-6"
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL  = "claude-haiku-4-5"
$env:ANTHROPIC_DEFAULT_OPUS_MODEL   = "claude-opus-4-6"

To make them persistent: setx CLAUDE_CODE_USE_FOUNDRY 1 (and so on), then sign out and back in (or restart Explorer). GUI apps like VS Code launched from the Start menu only pick up new user-env vars after the user session refreshes — opening a fresh terminal isn't enough.

🚫 The "mutually exclusive" trap

API Error: baseURL and resource are mutually exclusive

You'll hit this if you set both ANTHROPIC_FOUNDRY_RESOURCE and ANTHROPIC_FOUNDRY_BASE_URL. Pick one:

  • Most users → ANTHROPIC_FOUNDRY_RESOURCE=<name> (Claude Code builds the URL).
  • Custom subdomain / private endpoint → use ANTHROPIC_FOUNDRY_BASE_URL instead.

Step 6 — Verify the CLI

claude
> /status

Expected output:

API provider:                 Microsoft Foundry
Microsoft Foundry base URL:   https://<resource>.services.ai.azure.com/anthropic
Microsoft Foundry resource:   <resource>
Model:                        Default (claude-sonnet-4-6)

✍️ Figure 2: /status output confirming API provider: Microsoft Foundry.

Claude CLI /status panel showing Microsoft Foundry as the API provider

If you instead see "Anthropic" or it prompts for an Anthropic login, CLAUDE_CODE_USE_FOUNDRY isn't being inherited — see troubleshooting below.


Step 7 — Configure the VS Code extension

Install Claude Code from the VS Code Marketplace (publisher: Anthropic).

Open user settings.json (Ctrl+Shift+PPreferences: Open User Settings (JSON)) and add:

"claudeCode.environmentVariables": [
  { "name": "CLAUDE_CODE_USE_FOUNDRY",    "value": "1" },
  { "name": "ANTHROPIC_FOUNDRY_RESOURCE", "value": "<your-foundry-resource-name>" }
]

🪤 Schema gotcha. The MS Learn doc currently shows this as a plain {KEY: VALUE} object under the UI label "Claude Code: Environment Variables". In recent extension versions the actual JSON key is claudeCode.environmentVariables and the value must be an array of {name, value} objects. If you paste the doc's snippet verbatim, VS Code will flag "Missing property name", "Colon expected", "Unknown configuration setting". Use the array form above.

Make the extension see your az login

The extension inherits environment & credentials from the process that launches VS Code. After az login:

# In the same PowerShell where az login succeeded:
code .

If VS Code was already running, fully quit it (not just close the window) and relaunch from the terminal. Developer: Reload Window is not enough to refresh inherited Azure CLI credentials.

✍️ Figure 3: settings.json with the claudeCode.environmentVariables array form.

VS Code settings.json with claudeCode.environmentVariables


Step 8 — Try it

In VS Code, click the Claude Code (Spark) icon in the sidebar to open the panel. Type:

Summarize the structure of this project.

You should get a response within a few seconds, and the panel should indicate it's routing through Microsoft Foundry. Run /status inside the panel to confirm API provider: Microsoft Foundry if you want certainty.

✍️ Figure 4: Claude Code panel in VS Code responding through Microsoft Foundry.

Claude Code VS Code panel responding with Microsoft Foundry routing


Troubleshooting matrix

SymptomWhere it shows upLikely causeFix
API Error: baseURL and resource are mutually exclusiveclaude CLI on first requestBoth ANTHROPIC_FOUNDRY_BASE_URL and ANTHROPIC_FOUNDRY_RESOURCE setUnset one. Prefer ANTHROPIC_FOUNDRY_RESOURCE.
Unable to get authority configuration for https://login.microsoftonline.com/<guid>claude CLI startup or VS Code panelWrong tenant ID in az loginaz login --tenant <correct-guid>; verify with az account show
Failed to get token from azureADTokenProvider: ChainedTokenCredential authentication failedVS Code Claude Code panelExtension didn't inherit az login sessionQuit VS Code entirely; relaunch with code . from the authed shell
Token tenant does not match resource tenantclaude CLI or VS Code panelCLI logged into a different tenant than the Foundry resourceaz login --tenant <foundry-tenant>
The model <name> is not available on your foundry deploymentclaude CLI first use or VS Code model selectorDeployment name mismatchEither rename the Foundry deployment, or set ANTHROPIC_DEFAULT_*_MODEL to the actual name
401 / 403 on first requestclaude CLI or VS Code panelMissing RBAC on the resourceAssign Cognitive Services User and Foundry User on the resource scope
Claude Code prompts for Anthropic loginVS Code Claude Code panelCLAUDE_CODE_USE_FOUNDRY not set in the processSet the env var before launching claude / code .
VS Code shows "Unknown Configuration Setting" for claudeCode.environmentVariablesVS Code Settings tabWrong JSON shapeUse the array of {name,value} objects form
429 Too Many Requestsclaude CLI or VS Code panelTPM/RPM exhaustedFoundry portal → Operate → Quotas; request increase or reduce parallelism
Works in CLI, fails in VS Code extensionVS Code Claude Code panel onlyEnv vars set per-shell, not visible to GUI VS CodeUse setx (persistent user env) or move them into claudeCode.environmentVariables
"Model is not available in region"Foundry portal model deployment stepFoundry resource not in a supported regionDeploy a new Foundry resource in a supported region, or check model availability

Best practices

Auth & secrets - Prefer Entra ID over API keys. If you must use a key for CI, store it as a secret (GitHub Actions secret, Key Vault) — never in settings.json (it may sync via Settings Sync). - Scope RBAC at the resource level, not the subscription, for least privilege.

Project context - Create a CLAUDE.md at your repo root with stack, conventions, and entry-point commands. Claude Code reads it automatically and the quality jump is significant. - Use .claude/rules/*.md for per-area rules (e.g., test conventions, security rules).

Cost & latency - Let Claude Code's auto-routing pick the right role (Sonnet/Haiku/Opus). Don't pin everything to Opus. - Cap context with ANTHROPIC_MAX_TOKENS if you have a strict budget. (Note: not honored by every Claude Code version — check the Claude Code docs for your version.) - Watch token spend in Foundry → Operate → Metrics weekly.

Reliability - For team use, deploy all three model roles even if you don't think you need them — silent role-routing failures are confusing. - Tag your Foundry resource (env=dev|prod, team=...) for chargeback.

Reproducibility - Document the exact env vars and az login --tenant GUID in your team README. - Pin Claude Code CLI version in onboarding docs (claude --version) so new joiners hit the same behavior.


A note on the MS Learn doc

The doc is accurate but skips three things that caused the most friction in real-world deployments:

  1. VS Code extension settings shape — the example uses the UI label as a JSON key and an object instead of the array form the schema actually expects.
  2. Process inheritance — it says "set the env vars" but doesn't emphasize that the VS Code window must be launched from a shell where both az login and the env vars are live. Reloading the window doesn't help.
  3. Mutually exclusive RESOURCE vs BASE_URL — listed in passing, but the error message only appears at first request, after you think everything is configured.

If the Microsoft Learn page is updated, treat this post as a companion — same destination, fewer dead ends.


What you've got now

  • Claude Code running locally on your machine, talking to your Foundry resource.
  • Entra ID auth — no API keys to manage.
  • Full Foundry telemetry, quotas, and billing.
  • VS Code panel + CLI, both backed by the same setup.

Drop a CLAUDE.md in your repo and start shipping.


When to Use RESOURCE vs BASE_URL

Use RESOURCE (default) - Standard public deployments - No custom networking

Use BASE_URL - Private endpoints - Custom DNS / VNet routing

Never set both.

Read the whole story
alvinashcraft
21 seconds ago
reply
Pennsylvania, USA
Share this story
Delete

StreamCrate: portable media server

1 Share

This versatile portable media server has been built around Raspberry Pi 4. It offers ten hours of playback running off a 20,000mAh battery and a 5TB HDD stores a synced copy of maker Daveed Walzer’s media library.

For some years, Daveed Walzer had what he felt to be the perfect portable media server: a 2TB WD My Passport Wireless Pro. Having purchased it in 2017, he loved that it would wirelessly stream media to devices via a Plex server while working remotely in the French Alps and bouncing between ski stations. 

The device is small – weighing just over two pounds and roughly the size of a grapefruit.
It runs Raspberry Pi OS Lite and automatically launches the media player when HDMI is detected

“It was a tiny, grab-and-go, offline media server large enough to hold my entire media library,” he recalls. “I used that thing in hotels, Airbnbs, friends’ places, flights, tents, and more. I could connect to its hotspot and watch on my tablet or most TVs via a Chromecast puck. But, like a lot of long-lasting tech, as years passed, I started bristling at what I wished it could do.”

Streaming ahead

Daveed said the 2TB drive capacity had become limiting. He preferred the open-source media server Jellyfin for true, local-only playback, but the device’s firmware was Plex-only. It also lacked HDMI output, so every time he forgot his Chromecast, he couldn’t use hotel TVs. He decided to build something to replace it based around a Raspberry Pi computer and asked AI for help.

He’d recently tinkered with Raspberry Pi 3. “Over a week, I put together a slick multiroom audio system centred around Raspberry Pi running OwnTone,” he says. 

An Amazon Fire TV stick paired to Raspberry Pi enables full control of the interface. A button was also fitted to the device for easy shutdown

Encouraged, he asked AI if it was possible to recreate an updated version of WD Passport using Raspberry Pi. “It came back with ‘yes’, estimating a cost of $200,” Daveed says. “But what really screamed ‘let’s do this’ was the availability of a compact Geekworm Raspberry Pi 4 NAS case with a built-in 2.5″ SATA HDD bay.” Add to that a 5TB 2.5-inch SATA HDD, 20,000mAh power bank, and an external USB Wi-Fi adapter, and he had StreamCrate. On paper at least. 

Cracking the Kodi

Daveed’s requirement was to store an entire mirror of his network-attached storage (NAS) master media library. He needed to stream from Jellyfin to whatever device or smart TV was around via Wi-Fi, or plug directly via HDMI and let Kodi on the Raspberry Pi play directly. When truly offline, he wanted streaming via a USB Wi-Fi adapter hotspot.

But there were some challenges. The case wouldn’t fit a taller 5TB hard disk drive. Some Raspberry Pi limitations required workarounds too. The Kodi player was successfully set to auto-launch when Raspberry Pi detected an HDMI connected TV, but direct playback of some shows and movies proved problematic.

The aluminium case was cut to fit the drive and a new custom baseplate was then added

“For direct HDMI connection to TVs, Raspberry Pi is not just the server but also running the player. Raspberry Pi 4 cannot directly play some media encodings – with 10-bit depth and 4K H.264 being the key examples. I ran an analysis of my media collection and 20% of the content was unplayable via Kodi on Raspberry Pi,” Daveed reveals.

“This ended up being the hardest part of the project: determining what needed to be converted and how to automate it so it all happened in the background. In the end, this was done via Tdarr transcoder, running in a Docker container on the NAS that hosts the master media library. It took days of tweaking to get working.”

It certainly works well. “I have my entire library with me, playing on almost anything, anywhere,” he says. “It’s a wonderful feeling settling in for an early night in the camper-van, to finish with an episode of Adventure Time and the kiddo nodding off against me after a big day of big experiences.”

Find more Raspberry Pi projects in Raspberry Pi Official Magazine

This article appeared in issue 164 of Raspberry Pi Official Magazine, which you can access online for free. You can also subscribe to the print version of our magazine. Not only do we deliver worldwide, but those who sign up to the six- or twelve-month print subscription will receive a FREE Raspberry Pi Pico 2 W!

You can find Raspberry Pi Official Magazine on FacebookXThreadsLinkedIn, and Mastodon. You can also contact the team via email: magazine@raspberrypi.com

The post StreamCrate: portable media server appeared first on Raspberry Pi.

Read the whole story
alvinashcraft
30 seconds ago
reply
Pennsylvania, USA
Share this story
Delete

All systems glow

1 Share
Apple logo rendered in a glowing, three-dimensional metallic style with white, blue, and amber light refractions — centered against a black background, with the text "WWDC26" in silver below.

WWDC26 is just one week away. Get ready for five days of technology, creativity, and community — all online and free.

Learn more

Read the whole story
alvinashcraft
41 seconds ago
reply
Pennsylvania, USA
Share this story
Delete

Astro Markdown Component Utility for Any Framework

1 Share

In the previous article, I spoke about the why and how to use a Markdown component in Astro.

Here, we’re going to expand on that and help you use Markdown everywhere — regardless of the framework you use. So, this works for React, Vue, and Svelte.

The entire process hinges on the Markdown utility I’ve built for Splendid Labz.

Why This Utility?

I hit a snag when using most Markdown libraries. I naturally write Markdown content like this:

<div>
  <div>
    <!-- prettier-ignore -->
    <Markdown>
      This is a paragraph

      This is a second paragraph
    </Markdown>
  </div>
</div>

But since most markdown libraries don’t account for whitespace indentation, they create an output with <pre> and <code> tags.

This is because Markdown treats the indentation beyond four spaces as a code block:

<div>
  <div>
    <pre><code>  This is a paragraph

      This is a second paragraph
    </code></pre>
  </div>
</div>

So you’re forced to strip all indentation and write it like this instead:

<div>
  <div>
    <!-- prettier-ignore -->
    <Markdown>
  This is a paragraph

  This is a second paragraph
    </Markdown>
  </div>
</div>

That’s hard to read and annoying to maintain.

My Markdown utility handles this whitespace issue and generates the correct HTML regardless of how your code is indented:

<div>
  <div>
    <p>This is a paragraph</p>
    <p>This is a second paragraph</p>
  </div>
</div>

Using This in Your Framework

It’s easy. You have to pass the Markdown text into the utility. If inline is true, then markdown will return an output without paragraph tags.

Here’s an example with Astro.

---
import { markdown } from '@splendidlabz/utils'
const { inline = false, content } = Astro.props
const slotContent = await Astro.slots.render('default')

// Process content
const html = markdown(content || slotContent, { inline })
---

<Fragment set:html={html} />

You can then use it like this:

<Markdown>
   <!-- Your content here -->
</Markdown>

Here’s another example for Svelte.

Svelte cannot read dynamic content from slots, so we can only pass it through a prop.

<script>
  import { markdown } from '@splendidlabz/utils'
  const { content, inline = false } = $props()
  const html = markdown(content, { inline })
</script>

<!-- eslint-disable-next-line svelte/no-at-html-tags -->
{@html html}

And you can use it like this:

<Markdown content=`
  ### This is a header

  This is a paragraph
`/>

It’s rather simple to build the same for React and Vue so I’d leave that up to you.

Taking it Further

I’ve been building for the web — long enough to experience the frustration of doing the same things over and over again.

So I consolidated everything I use into a few simple libraries — like Splendid Utils, and a few others for layouts, Astro and Svelte components.

I write about all of them on my blog. Come by if you’re interested in better DX as you build your sites and apps!


Astro Markdown Component Utility for Any Framework originally handwritten and published with love on CSS-Tricks. You should really get the newsletter as well.

Read the whole story
alvinashcraft
53 seconds ago
reply
Pennsylvania, USA
Share this story
Delete
Next Page of Stories