Skip to content

Conversation

@Henrrypg
Copy link

This pull request updates the way configuration settings for AI model integration are managed in the openedx_ai_extensions plugin. The main change is moving from hardcoded values in the backend to dynamic, configurable settings that can be managed through Tutor and environment variables. This makes the plugin more flexible and easier to configure for different environments.

Key changes include:

Configuration Management Improvements:

  • Added new configuration variables (OPENEDX_AI_EXTENSIONS_VERSION, OPENEDX_AI_EXTENSIONS_API_KEY, OPENEDX_AI_EXTENSIONS_MODEL, OPENEDX_AI_EXTENSIONS_TEMPERATURE, OPENEDX_AI_EXTENSIONS_LLM_FUNCTION) to the Tutor patch file, enabling external configuration of AI model settings.
  • Registered these new settings with default values in the plugin initialization (plugin.py), so they are available and can be overridden as needed.

Backend Refactoring:

  • Updated the backend to use the new settings variables (OPENEDX_AI_EXTENSIONS_*) instead of hardcoded values for the AI model, API key, temperature, and LLM function in the workflow configuration.
  • Removed the previous hardcoded assignment of AI model and API key from the plugin_settings function, making the backend rely solely on the externally provided settings.

Copy link
Member

@felipemontoya felipemontoya left a comment

Choose a reason for hiding this comment

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

the 2 things I dont like (as per our call)

  • too many variables, we can try something like what django does for DATABASES
  • even though we are writing it tutor first, we should make it safe for someone to not use tutor, which it currently is not as the variables jump from tutor to backend code

@Henrrypg Henrrypg force-pushed the hpg/use-tutor-configs branch from f2c9310 to 484f600 Compare October 23, 2025 16:19
@Henrrypg Henrrypg force-pushed the hpg/add-tutor-plugin branch 3 times, most recently from 5ccd34c to d117c81 Compare October 27, 2025 15:01
@felipemontoya felipemontoya force-pushed the hpg/use-tutor-configs branch 2 times, most recently from e4dafbb to 98566c7 Compare November 1, 2025 00:30
---
adding simple configuration with key only for openai and anthropic and override capacity
@Henrrypg Henrrypg force-pushed the hpg/use-tutor-configs branch from 863263b to f9eed65 Compare November 4, 2025 14:22
@Henrrypg Henrrypg force-pushed the hpg/use-tutor-configs branch from f9eed65 to d82be77 Compare November 4, 2025 14:28
@Henrrypg Henrrypg closed this Nov 4, 2025
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.

3 participants