Skip to content

[QA:ai] LM Studio local provider still requires API key #24

Description

@SweetingTech

User role: Player/DM setup
Severity: sev1 blocker for no-key local-LLM QA
Area: ai, local-llm, setup

Repro steps:

  1. Start the app with ./scripts/start.ps1 -Mode docker.
  2. Ensure LM Studio is running at http://localhost:1234/v1 with model gemma-4-e4b-uncensored-hauhaucs-aggressive.
  3. From dashboard, create a new campaign with the wizard and leave Use this model for DM & NPC narration checked.
  4. Confirm state.campaign_settings stores llm_provider=lmstudio, llm_base_url=http://localhost:1234/v1, and model gemma-4-e4b-uncensored-hauhaucs-aggressive.
  5. Call provider smoke endpoint: POST /api/ai/test_provider with provider lmstudio, base URL http://localhost:1234/v1, and model gemma-4-e4b-uncensored-hauhaucs-aggressive.

Expected:
Local LM Studio provider works in no-key mode, or the app supplies a harmless dummy API key internally for OpenAI-compatible local servers. The README/product promise is that mock/no-key local mode remains sufficient for demo play and release verification.

Actual:
The endpoint returns HTTP 4xx with:
{"error":"Missing credentials. Please pass an api_key, workload_identity, admin_api_key, or set the OPENAI_API_KEY or OPENAI_ADMIN_KEY environment variable.","ok":false}

Environment:

  • App: local Docker mode on Windows
  • LM Studio /v1/models: reachable
  • Model: gemma-4-e4b-uncensored-hauhaucs-aggressive
  • QA campaign: QA Full Monkey 2026-05-18
  • Campaign id: 4d5bf959-c511-4efa-84b1-52d509ada647
  • Session id: cac16a8f-635f-4d83-a24a-77e38a37716b

Acceptance criteria:

  • POST /api/ai/test_provider succeeds for provider=lmstudio without user-entered API keys when LM Studio is reachable.
  • AI character generation and narration can use LM Studio without requiring cloud API key configuration.
  • Add a regression test for local OpenAI-compatible providers using dummy/no-key auth behavior.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions