Skip to content

feat: add Groq, Mistral, and xAI model provider plugins - #184

Closed
warun7 wants to merge 2 commits into
sapientinc:mainfrom
warun7:feat/add-groq-mistral-xai-providers
Closed

warun7 wants to merge 2 commits into
sapientinc:mainfrom
warun7:feat/add-groq-mistral-xai-providers

Conversation

@warun7

@warun7 warun7 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds first-class OpenAI-compatible model provider plugins for Groq (model_provider:groq_alias), Mistral (model_provider:mistral_alias), and xAI (model_provider:xai_alias).

While _env.py and codex-relay already defined key names (GROQ_API_KEY, MISTRAL_API_KEY, XAI_API_KEY) and upstream endpoints for these providers, only deepseek_alias was previously materialized as an active plugin and mapped in PROVIDER_REF_FOR_SHORT_NAME. This PR closes that gap, enabling operators to configure and start runs using --provider groq / mistral / xai or --model-provider model_provider:groq_alias with automatic credential resolution and runtime relay execution.

Scope

  • Affected modules or public contracts:
    • praxist.plugins.model_providers: Added groq_alias, mistral_alias, and xai_alias plugins.
    • praxist.cli._env: Registered short name mappings in PROVIDER_REF_FOR_SHORT_NAME.
    • praxist.cli._setup_common: Updated provider_key_var(), provider_short_name(), and provider_plugin_ref() normalization dictionaries.
    • praxist.core.credentials: Added GROQ_API_KEY, MISTRAL_API_KEY, and XAI_API_KEY specs to CredentialResolver.ENV_SPECS.
    • praxist.plugins.agent_runtimes.codex_sdk: Declared new provider aliases in compatible_model_providers.
    • praxist.plugins.workflow_stages.research_loop: Added provider environment handling in provider_env.py and stage.py.
    • docs/: Updated plugin reference (docs/reference/plugins.md), model provider guide (docs/guides/model-providers.md), and credentials guide (docs/guides/credentials.md).
  • Compatibility considerations:
    • Fully backwards compatible. No existing contracts or provider defaults are changed.
    • New plugins adhere to the established openai_compatible wire format and use codex-relay when invoked under agent_runtime:codex_sdk.
  • Task-agnostic rationale, when shared Praxist behavior changes:
    • Generic reusable plugins belong under praxist/plugins/model_providers/ and contain no task-specific logic or facts.

Verification

  • Unit & Conformance Tests (194 tests run, all passing):
    • tests/conformance/test_core_plugin_contracts.py (verified normalization, default profile resolution, and call building)
    • tests/unit/test_modeling_normalize.py (verified default model resolution from plugin manifests)
    • tests/unit/test_codex_sdk_relay.py (verified SDK routing name normalization and relay requirements)
    • tests/unit/test_cli_setup_commands.py (verified praxist configure-llm for groq, mistral, and xai)
    • tests/unit/test_startup_helper_contracts.py (verified freeze_provider_env behavior)
    • tests/unit/test_coverage_95_contracts.py (verified stage._provider_env behavior)
    • tests/hardening/test_refactor_hardening.py (verified credential discovery and selection)
  • Hardening & Hygiene Checks:
    • tests/hardening/test_generic_architecture_boundaries.py (passed)
    • tests/hardening/test_env_read_discipline.py (passed after updating allowlist)
    • tests/hardening/test_documentation_contracts.py (passed)
    • scripts/build_docs_site.py --check-generated (passed)
    • python3 -m compileall -q praxist tests templates examples scripts (passed)
    • git diff --check (passed)
  • Manual CLI Verification:
    • Verified dynamic candidate discovery via PluginLoader.
    • Verified praxist configure-llm --provider groq/mistral/xai --dry-run.

Checklist

  • The change is focused and does not include unrelated generated files.
  • Tests cover the affected behavior.
  • Documentation, templates, examples, and skills were updated where needed.
  • No credentials, private task data, or research-run artifacts are included.
  • New dependencies and copied assets include their source and license terms.
  • I have read .github/CONTRIBUTING.md and the contribution terms in LICENSE.md.

- Add model_provider:groq_alias, model_provider:mistral_alias, and
  model_provider:xai_alias plugins on the OpenAI-compatible path.
- Register short name mapping in praxist.cli._env and alias normalization
  in praxist.cli._setup_common.
- Add GROQ_API_KEY, MISTRAL_API_KEY, and XAI_API_KEY to
  CredentialResolver.ENV_SPECS.
- Declare compatibility with agent_runtime:codex_sdk for Chat
  Completions relay execution.
- Add provider environment handling in research_loop stage and provider_env.
- Update plugin reference and provider guides in docs/.
- Add unit, conformance, relay, setup, and hardening test coverage.
@warun7
warun7 requested a review from electrixoul as a code owner September 2, 2026 22:54
@electrixoul

Copy link
Copy Markdown
Collaborator

Thank you @warun7 for contributing the Groq, Mistral, and xAI provider plugins and their CLI/runtime wiring.

We have preserved your commits and integrated them into the shared validation/model-provider-expansion branch alongside the other model-provider contributions. Combined review found one cross-module gap between stage-level credential discovery and the research-loop request environment; the validation branch now forwards only the selected provider key across that boundary and adds regression coverage to prevent unrelated credentials from leaking. The branch passed the complete local suite (3,091 tests, 6 expected skips), blocking local CI guardrails, unit/integration coverage, docs generation, and compile checks before push.

Our maintainer workflow is documented here: https://github.com/sapientinc/PRAXIST/blob/main/docs/guides/contributing.md#what-happens-after-submission. The validation branch is now ready for the separately scheduled real-task experiment stage. If that stage confirms there is no cross-task regression, we will promote the validated work to main while retaining your authorship.

We are closing this source PR because its implementation has been transferred to the validation branch, not because the contribution was rejected. This discussion and attribution remain available.

@electrixoul electrixoul closed this Sep 3, 2026
@Glen-SP

Glen-SP commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Update: this shipped. Your Groq, Mistral and xAI provider plugins are now on
main in 34e6de7, merged via #200, with co-author credit.

Thank you for your contribution, @warun7

1 similar comment
@Glen-SP

Glen-SP commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Update: this shipped. Your Groq, Mistral and xAI provider plugins are now on
main in 34e6de7, merged via #200, with co-author credit.

Thank you for your contribution, @warun7

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