Troubleshooting gpt-oss and vLLM Errors
Use when diagnosing openai_harmony.HarmonyError or gpt-oss tool calling issues with vLLM. Identifies error sources (vLLM server vs client), maps specific error messages to known GitHub issues, and provides configuration fixes for tool calling problems with gpt-oss models.
What this skill does
# Troubleshooting gpt-oss and vLLM Errors ## When to Use This Skill Invoke this skill when you encounter: - `openai_harmony.HarmonyError` messages in any context - gpt-oss tool calling failures or unexpected behavior - Token parsing errors with vLLM serving gpt-oss models - Users asking about gpt-oss compatibility with frameworks like llama-stack ## Critical First Step: Identify Error Source **IMPORTANT**: `openai_harmony.HarmonyError` messages originate from the **vLLM server**, NOT from client applications (like llama-stack, LangChain, etc.). ### Error Source Identification 1. **Check the error origin**: - If error contains `openai_harmony.HarmonyError`, it's from vLLM's serving layer - The client application is just reporting what vLLM returned - Do NOT search the client codebase for fixes 2. **Correct investigation path**: - Search vLLM GitHub issues and PRs - Check openai/harmony repository for parser issues - Review vLLM server configuration and startup flags - Examine HuggingFace model files (generation_config.json) ## Common Error Patterns ### Token Mismatch Errors **Error Pattern**: `Unexpected token X while expecting start token Y` **Example**: `Unexpected token 12606 while expecting start token 200006` **Meaning**: - vLLM expects special Harmony format control tokens - Model is generating regular text tokens instead - Token 12606 = "comment" (indicates model generating reasoning text instead of tool calls) **Known Issues**: - vLLM #22519: gpt-oss-20b tool_call token errors - vLLM #22515: Same error, fixed by updating generation_config.json **Fixes**: 1. Update model files from HuggingFace (see reference/model-updates.md) 2. Verify vLLM server flags for tool calling 3. Check generation_config.json EOS tokens ### Tool Calling Not Working **Symptoms**: - Model describes tools in text but doesn't call them - Empty `tool_calls=[]` arrays - Tool responses in wrong format **Root Causes**: 1. Missing vLLM server flags 2. Outdated model configuration files 3. Configuration mismatch between client and server **Configuration Requirements**: vLLM server must be started with: ```bash --tool-call-parser openai --enable-auto-tool-choice ``` For demo tool server: ```bash --tool-server demo ``` For MCP tool servers: ```bash --tool-server ip-1:port-1,ip-2:port-2 ``` **Important**: Only `tool_choice='auto'` is supported. ## Investigation Workflow 1. **Identify the error message**: - Copy the exact error text - Note any token IDs mentioned 2. **Search vLLM GitHub**: - Use error text in issue search - Include "gpt-oss" and model size (20b/120b) - Check both open and closed issues 3. **Check model configuration**: - Verify generation_config.json is current - Compare against latest HuggingFace version - Look for recent commits that updated config 4. **Review server configuration**: - Check vLLM startup flags - Verify tool-call-parser settings - Confirm vLLM version compatibility 5. **Check vLLM version**: - Many tool calling issues resolved in recent vLLM releases - Update to latest version if encountering errors - Check vLLM changelog for gpt-oss-specific fixes ## Quick Reference ### Key Resources - vLLM gpt-oss recipe: https://docs.vllm.ai/projects/recipes/en/latest/OpenAI/GPT-OSS.html - Common issues: See reference/known-issues.md - Model update procedure: See reference/model-updates.md ### Diagnostic Commands Check vLLM server health: ```bash curl http://localhost:8000/health ``` List available models: ```bash curl http://localhost:8000/v1/models ``` Check vLLM version: ```bash pip show vllm ``` ## Progressive Disclosure For detailed information: - **Known GitHub issues**: See reference/known-issues.md - **Model file updates**: See reference/model-updates.md - **Tool calling configuration**: See reference/tool-calling-setup.md ## Validation Steps After implementing fixes: 1. Test simple tool calling with single function 2. Verify Harmony format tokens in responses 3. Check for token mismatch errors in logs 4. Test multi-turn conversations with tools 5. Monitor for "unexpected token" errors If errors persist: - Update vLLM to latest version - Check vLLM GitHub for recent fixes and PRs - Try different model variant (120b vs 20b) - Review vLLM logs for additional error context
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.