maximus Posted May 3 Author Posted May 3 Context v1.5.0 — AI Gateway Hi, just pushed a new release. The main addition is a centralized AI Gateway — a ContextAI class that any ProcessWire module can use to make AI requests through a single shared configuration: $ai = wire('context')->ai(); // Simple $text = $ai->complete('Summarize: ' . $page->title); // Full options $result = $ai->chat([ 'messages' => [['role' => 'user', 'content' => '...']], 'model' => 'openai/gpt-4o-mini', 'caller' => 'MyModule', ]); // Gateway entry point for third-party modules $result = $ai->gateway(['caller' => 'MyModule', 'messages' => [...]]); Supported providers: OpenRouter (200+ models via one key), OpenAI, or any OpenAI-compatible endpoint. New settings fieldset: provider, API key, default model, temperature, max tokens, timeout, global system prompt, and a Test Connection button that fires a live request and shows the response time. The idea is that modules don't need to implement their own HTTP clients or manage API keys — they just call wire('context')->ai() and everything is configured in one place. GitHub: https://github.com/mxmsmnv/Context 2
maximus Posted May 30 Author Posted May 30 Hi everyone, Context 2.0.0 has been released. This is a larger cleanup and stability release focused on making the module more useful for AI-assisted ProcessWire development, while also making the codebase easier to maintain. Highlights Added explicit export format selection: TOON, JSON, CSV TOON-only and JSON-only exports now clean up stale artifacts automatically CLI export, admin export, and auto-update now share the same export pipeline Restored and hardened documented CLI commands: php index.php --context-export php index.php --context-export --toon-only php index.php --context-export --json-only php index.php --context-stats php index.php --context-query ... php index.php --context-eval ... php index.php --context-stdin Added a dedicated context-admin permission Admin actions now require POST + CSRF validation Export path validation was hardened to avoid unsafe targets and symlinks Sample exports now skip fields matching a configurable sensitive-field denylist Dashboard was redesigned for the 2.0 workflow with current export status, CLI commands, configuration overview, and export preview The module internals were split into focused classes under src/ AI workflow The recommended AI workflow is now: php index.php --context-export --toon-only php index.php --context-stats php index.php --context-query templates php index.php --context-query pages "template=your-template, limit=10" Then start with: SKILL.md templates.toon structure.toon README.md TOON remains the recommended format for AI agents because it is much smaller than JSON while preserving the same structure. Notes This release includes a fairly large internal refactor. The main module file is now mostly ProcessWire wiring, routes, settings, and compatibility wrappers. Export logic, dashboard rendering, CLI handling, filesystem safety, serializers, docs generation, and AI gateway code now live in separate src/ classes. Release: https://github.com/mxmsmnv/Context/releases/tag/v2.0.0 Repository: https://github.com/mxmsmnv/Context Feedback, testing, and suggestions are very welcome. 5
szabesz Posted yesterday at 12:02 PM Posted yesterday at 12:02 PM On 5/30/2026 at 6:39 PM, maximus said: This release includes a fairly large internal refactor. Hello @maximus Thank you for the new version. I could not upgrade to it, so I uninstalled the module instead, but I guess you are interested in the error I got after upgrading from Context 1.1.9 to the latest. Spoiler I am not sure if I will try to use Context 2 or not, as currently I am into Ryan's AI modules to learn how they can aid my workflow.
maximus Posted 13 hours ago Author Posted 13 hours ago 12 hours ago, szabesz said: I am not sure if I will try to use Context 2 or not, as currently I am into Ryan's AI modules to learn how they can aid my workflow. Hi Gabor, sorry this one slipped through and thank you for being one of the first users to test it — that feedback is exactly why we can improve it. You’re right about this: upgrading from 1.1.9 could hit a config-time issue with ContextConfigFields, which made the module fail to load in some setups. I’ve fixed this in Context 2.0.1 (it now properly loads the config helper before the static config method uses it). You can grab the latest version here: https://github.com/mxmsmnv/Context/releases/tag/v2.0.1 If you can, please try reinstalling/updating to 2.0.1. That should remove this error. Sorry again for the trouble — thank you for the patience and stay tuned, I’ll keep these upgrade paths as stable as possible.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now