Skip to content

Conversation

@wyzBelinda
Copy link

Summary

  • The demo UI fails with a 404 because the code contains a hardcoded deprecated model name gpt-3.5-turbo-0301.
  • This PR fixes the immediate failure and makes the model configurable via an environment variable for future-proofing.

What I changed

  • Replaced occurrences of gpt-3.5-turbo-0301 with gpt-3.5-turbo.
  • Added a small configuration helper lida/config.py with:
    • DEFAULT_MODEL = "gpt-3.5-turbo"
    • get_model() which reads LIDA_MODEL env var and falls back to DEFAULT_MODEL
  • Updated docs with docs/model.md describing LIDA_MODEL usage.

Why

  • OpenAI has deprecated the older model name; hardcoding it breaks the demo for new users.
  • Making the model configurable allows users/maintainers to change the model without modifying code.

Testing / verification

  1. Checkout branch and install requirements.
  2. Run the UI:
    pip install -U llmx openai
    lida ui --port=8080 --docs
  3. Open Demo -> movies.json and confirm no 404 error.
  4. (Optional) Set LIDA_MODEL to a different valid model and confirm the app uses it.
  5. Run the test suite (if present) and ensure tests pass.

Notes / follow-ups

  • If maintainers prefer a different default model, we can update DEFAULT_MODEL before merging.
  • If the repository already has a config system, the helper can be integrated with it instead of using an env var.

@wyzBelinda
Copy link
Author

@microsoft-github-policy-service agree

@wyzBelinda
Copy link
Author

wyzBelinda commented Dec 2, 2025 via email

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.

1 participant