Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
# Get your X.AI API key from: https://console.x.ai/
XAI_API_KEY=your_xai_api_key_here

# Get your Cerebras API key from: https://inference-docs.cerebras.ai/
# Cerebras provides ultra-fast inference for ZAI-GLM, OpenAI GPT-OSS, Qwen3, and Llama models
CEREBRAS_API_KEY=your_cerebras_api_key_here
# CEREBRAS_ALLOWED_MODELS=zai-glm-4.7
# CEREBRAS_MODELS_CONFIG_PATH=/path/to/custom_cerebras_models.json

# Get your DIAL API key and configure host URL
# DIAL provides unified access to multiple AI models through a single API
DIAL_API_KEY=your_dial_api_key_here
Expand Down Expand Up @@ -105,6 +111,16 @@ DEFAULT_THINKING_MODE_THINKDEEP=high
# - grok3 (shorthand for grok-3)
# - grokfast (shorthand for grok-3-fast)
#
# Supported Cerebras models:
# - gpt-oss-120b (128K context, ~3000 tok/s, OpenAI OSS reasoning model)
# - gpt-oss, oss-120b, openai-oss (shorthands for gpt-oss-120b)
# - qwen-3-235b-a22b-instruct-2507 (128K context, ~1400 tok/s, frontier coding/reasoning)
# - qwen3, qwen-3, qwen235b, qwen3-235b (shorthands for qwen-3-235b-a22b-instruct-2507)
# - zai-glm-4.7 (128K context, ~1000 tok/s, reasoning, tool calling)
# - cerebras, glm, glm-4.7, zai, zai-glm (shorthands for zai-glm-4.7)
# - llama3.1-8b (32K context, ~2200 tok/s, fastest small model)
# - llama8b, llama-8b, llama3.1, llama3-8b (shorthands for llama3.1-8b)
#
# Supported DIAL models (when available in your DIAL deployment):
# - o3-2025-04-16 (200K context, latest O3 release)
# - o4-mini-2025-04-16 (200K context, latest O4 mini)
Expand Down Expand Up @@ -142,6 +158,7 @@ DEFAULT_THINKING_MODE_THINKDEEP=high
# OPENAI_ALLOWED_MODELS=
# GOOGLE_ALLOWED_MODELS=
# XAI_ALLOWED_MODELS=
# CEREBRAS_ALLOWED_MODELS=zai-glm-4.7 # Only allow zai-glm-4.7
# DIAL_ALLOWED_MODELS=

# Optional: Custom model configuration file path
Expand Down
111 changes: 111 additions & 0 deletions conf/cerebras_models.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"_README": {
"description": "Model metadata for Cerebras Inference API.",
"documentation": "https://inference-docs.cerebras.ai/models",
"usage": "Models listed here are exposed directly through the Cerebras provider. Aliases are case-insensitive.",
"field_notes": "Matches providers/shared/model_capabilities.py.",
"field_descriptions": {
"model_name": "The model identifier (e.g., 'zai-glm-4.7')",
"aliases": "Array of short names users can type instead of the full model name",
"context_window": "Total number of tokens the model can process (input + output combined)",
"max_output_tokens": "Maximum number of tokens the model can generate in a single response",
"supports_extended_thinking": "Whether the model supports extended reasoning tokens",
"supports_json_mode": "Whether the model can guarantee valid JSON output",
"supports_function_calling": "Whether the model supports function/tool calling",
"supports_images": "Whether the model can process images/visual input",
"supports_temperature": "Whether the model accepts temperature parameter in API calls",
"description": "Human-readable description of the model",
"intelligence_score": "1-20 human rating used as the primary signal for auto-mode model ordering"
}
},
"models": [
{
"model_name": "gpt-oss-120b",
"friendly_name": "Cerebras (gpt-oss-120b)",
"aliases": [
"gpt-oss",
"oss-120b",
"openai-oss"
],
"intelligence_score": 17,
"description": "OpenAI GPT-OSS 120B — ultra-fast inference (~3000 tok/s), 128K context, internal chain-of-thought reasoning, strong agentic/tool-use",
"context_window": 131072,
"max_output_tokens": 40000,
"supports_extended_thinking": false,
"supports_system_prompts": true,
"supports_streaming": true,
"supports_function_calling": true,
"supports_json_mode": true,
"supports_images": false,
"supports_temperature": true,
"temperature_constraint": "range"
},
{
"model_name": "qwen-3-235b-a22b-instruct-2507",
"friendly_name": "Cerebras (qwen-3-235b-a22b-instruct-2507)",
"aliases": [
"qwen3",
"qwen-3",
"qwen235b",
"qwen3-235b"
],
"intelligence_score": 16,
"description": "Qwen3-235B-A22B Instruct 2507 — fast inference (~1400 tok/s), 128K context, strong coding/reasoning/tool use",
"context_window": 131072,
"max_output_tokens": 40000,
"supports_extended_thinking": false,
"supports_system_prompts": true,
"supports_streaming": true,
"supports_function_calling": true,
"supports_json_mode": true,
"supports_images": false,
"supports_temperature": true,
"temperature_constraint": "range"
},
{
"model_name": "zai-glm-4.7",
"friendly_name": "Cerebras (zai-glm-4.7)",
"aliases": [
"cerebras",
"glm",
"glm-4.7",
"zai",
"zai-glm"
],
"intelligence_score": 14,
"description": "Cerebras ZAI-GLM 4.7 — fast inference (~1000 tok/s), 128K context, reasoning model with tool calling",
"context_window": 131072,
"max_output_tokens": 40000,
"supports_extended_thinking": false,
"supports_system_prompts": true,
"supports_streaming": true,
"supports_function_calling": true,
"supports_json_mode": true,
"supports_images": false,
"supports_temperature": true,
"temperature_constraint": "range"
},
{
"model_name": "llama3.1-8b",
"friendly_name": "Cerebras (llama3.1-8b)",
"aliases": [
"llama8b",
"llama-8b",
"llama3.1",
"llama3-8b"
],
"intelligence_score": 9,
"description": "Meta Llama 3.1 8B — fastest small model on Cerebras (~2200 tok/s), 32K context, ideal for real-time and high-throughput tasks",
"context_window": 32768,
"max_output_tokens": 8192,
"supports_extended_thinking": false,
"supports_system_prompts": true,
"supports_streaming": true,
"supports_function_calling": true,
"supports_json_mode": true,
"supports_images": false,
"supports_temperature": true,
"temperature_constraint": "range"
}
]
}
2 changes: 2 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ DEFAULT_MODEL=auto # Claude picks best model for each task (recommended)
- `conf/openai_models.json` – OpenAI catalogue (can be overridden with `OPENAI_MODELS_CONFIG_PATH`)
- `conf/gemini_models.json` – Gemini catalogue (`GEMINI_MODELS_CONFIG_PATH`)
- `conf/xai_models.json` – X.AI / GROK catalogue (`XAI_MODELS_CONFIG_PATH`)
- `conf/cerebras_models.json` – Cerebras Inference catalogue (`CEREBRAS_MODELS_CONFIG_PATH`)
- `conf/openrouter_models.json` – OpenRouter catalogue (`OPENROUTER_MODELS_CONFIG_PATH`)
- `conf/dial_models.json` – DIAL aggregation catalogue (`DIAL_MODELS_CONFIG_PATH`)
- `conf/custom_models.json` – Custom/OpenAI-compatible endpoints (`CUSTOM_MODELS_CONFIG_PATH`)
Expand All @@ -84,6 +85,7 @@ DEFAULT_MODEL=auto # Claude picks best model for each task (recommended)
| OpenAI | `gpt-5.2`, `gpt-5.1-codex`, `gpt-5.1-codex-mini`, `gpt-5`, `gpt-5.2-pro`, `gpt-5-mini`, `gpt-5-nano`, `gpt-5-codex`, `gpt-4.1`, `o3`, `o3-mini`, `o3-pro`, `o4-mini` | `gpt5.2`, `gpt-5.2`, `5.2`, `gpt5.1-codex`, `codex-5.1`, `codex-mini`, `gpt5`, `gpt5pro`, `mini`, `nano`, `codex`, `o3mini`, `o3pro`, `o4mini` |
| Gemini | `gemini-2.5-pro`, `gemini-2.5-flash`, `gemini-2.0-flash`, `gemini-2.0-flash-lite` | `pro`, `gemini-pro`, `flash`, `flash-2.0`, `flashlite` |
| X.AI | `grok-4`, `grok-4.1-fast` | `grok`, `grok4`, `grok-4.1-fast-reasoning` |
| Cerebras | `zai-glm-4.7`, `gpt-oss-120b`, `qwen-3-235b-a22b-instruct-2507`, `llama3.1-8b` | `cerebras`, `glm`, `zai`, `gpt-oss`, `oss-120b`, `qwen3`, `qwen235b`, `llama8b`, `llama3.1` |
| OpenRouter | See `conf/openrouter_models.json` for the continually evolving catalogue | e.g., `opus`, `sonnet`, `flash`, `pro`, `mistral` |
| Custom | User-managed entries such as `llama3.2` | Define your own aliases per entry |

Expand Down
83 changes: 83 additions & 0 deletions providers/cerebras.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
"""Cerebras Inference model provider implementation."""

from __future__ import annotations

import logging
from typing import TYPE_CHECKING, ClassVar

if TYPE_CHECKING:
from tools.models import ToolModelCategory

from .openai_compatible import OpenAICompatibleProvider
from .registries.cerebras import CerebrasModelRegistry
from .registry_provider_mixin import RegistryBackedProviderMixin
from .shared import ModelCapabilities, ProviderType

logger = logging.getLogger(__name__)


class CerebrasModelProvider(RegistryBackedProviderMixin, OpenAICompatibleProvider):
"""Integration for Cerebras Inference API.

Publishes capability metadata for the officially supported deployments and
maps tool-category preferences to the appropriate Cerebras model.

Model routing by category:
BALANCED → zai-glm-4.7 (default; only model on Cerebras Code plan)
EXTENDED_REASONING → gpt-oss-120b (strongest reasoning, ~3000 tok/s; paid tier)
FAST_RESPONSE → llama3.1-8b (fastest small model, ~2200 tok/s; paid tier)
"""

FRIENDLY_NAME = "Cerebras"

REGISTRY_CLASS = CerebrasModelRegistry
MODEL_CAPABILITIES: ClassVar[dict[str, ModelCapabilities]] = {}

# Category routing — ordered preference lists (first available wins).
# zai-glm-4.7 is the default: it is the only model on the Cerebras Code
# (free) plan and must always be the BALANCED fallback.
_REASONING_PREFERENCE = ["gpt-oss-120b", "qwen-3-235b-a22b-instruct-2507", "zai-glm-4.7", "llama3.1-8b"]
_BALANCED_PREFERENCE = ["zai-glm-4.7", "qwen-3-235b-a22b-instruct-2507", "gpt-oss-120b", "llama3.1-8b"]
_FAST_PREFERENCE = ["llama3.1-8b", "zai-glm-4.7", "qwen-3-235b-a22b-instruct-2507", "gpt-oss-120b"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The CerebrasModelProvider class is missing the _resolve_model_name method. While the base ModelProvider might have a generic implementation, native providers in this repository typically implement this method to leverage the registry's optimized alias_map for resolving shorthands (like cerebras or glm) to canonical names before making API calls. This is critical for ensuring that aliases defined in conf/cerebras_models.json work correctly in generate_content.

Suggested change
def _resolve_model_name(self, model_name: str) -> str:
"""Resolve model name or alias to canonical name."""
self._ensure_registry()
if self._registry:
config = self._registry.resolve(model_name)
if config:
return config.model_name
return model_name

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Respectfully pushing back on this one — I believe the suggestion is unnecessary and the suggested code would not work as drafted.

Why no override is needed: The base class ModelProvider._resolve_model_name() (providers/base.py:404) already does proper alias resolution by calling get_all_model_capabilities() and ModelCapabilities.collect_aliases(). OpenAICompatibleProvider calls self._resolve_model_name() in three places (providers/openai_compatible.py:83, 550, 725) before any API call.

The reference XAI provider doesn't override it either. providers/xai.py extends the same RegistryBackedProviderMixin + OpenAICompatibleProvider pair and relies on the base class implementation. The Cerebras provider intentionally mirrors that pattern for consistency with the existing codebase.

It's already test-covered. tests/test_cerebras_provider.py::test_generate_content_resolves_alias_before_api_call mocks the OpenAI client and asserts that when generate_content(model_name="cerebras") is called, the underlying API receives "zai-glm-4.7" (the resolved canonical name), not the alias. test_generate_content_other_aliases does the same for glm, glm-4.7, zai, and zai-glm. test_resolve_model_name verifies the resolution directly.

It has been validated end-to-end against the live Cerebras API. Before opening this PR, all 16 aliases (4 for gpt-oss-120b, 4 for qwen3-235b, 5 for zai-glm-4.7, 4 for llama3.1-8b) were manually exercised via real api.cerebras.ai/v1 calls and confirmed to resolve correctly.

The suggested code would not work as drafted. self._registry is not the attribute used by RegistryBackedProviderMixin — the mixin exposes a class-level registry via _REGISTRY and the _ensure_registry() hook. Adopting the snippet as written would either crash or silently no-op on first call. If there's a different optimization path you have in mind, happy to discuss, but the current implementation works correctly and matches the established pattern in the repo.

def __init__(self, api_key: str, **kwargs):
"""Initialize Cerebras provider with API key."""
kwargs.setdefault("base_url", "https://api.cerebras.ai/v1")
self._ensure_registry()
super().__init__(api_key, **kwargs)
self._invalidate_capability_cache()

def get_provider_type(self) -> ProviderType:
"""Get the provider type."""
return ProviderType.CEREBRAS

def get_preferred_model(self, category: ToolModelCategory, allowed_models: list[str]) -> str | None:
"""Get Cerebras's preferred model for a given category from allowed models.

Args:
category: The tool category requiring a model
allowed_models: Pre-filtered list of models allowed by restrictions

Returns:
Preferred model name or None
"""
if not allowed_models:
return None

from tools.models import ToolModelCategory

if category == ToolModelCategory.EXTENDED_REASONING:
preference = self._REASONING_PREFERENCE
elif category == ToolModelCategory.FAST_RESPONSE:
preference = self._FAST_PREFERENCE
else: # BALANCED or default
preference = self._BALANCED_PREFERENCE

for model in preference:
if model in allowed_models:
return model
Comment on lines +76 to +78
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Apply Cerebras allowlist before category model routing

This selector assumes allowed_models is already restriction-filtered, but CEREBRAS_ALLOWED_MODELS is not wired into ModelRestrictionService.ENV_VARS, so auto-mode can pass the full Cerebras catalog here. In that case EXTENDED_REASONING/FAST_RESPONSE may pick gpt-oss-120b or llama3.1-8b even when only zai-glm-4.7 is configured, and the request then fails later when generate_content() enforces the provider allowlist. Please enforce the provider allowlist before choosing from preference (or add Cerebras to the centralized restriction mapping) so auto-mode never selects a disallowed model.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Great catch — confirmed real bug and fixed in c10f78d.

CEREBRAS_ALLOWED_MODELS was documented in .env.example but missing from ModelRestrictionService.ENV_VARS (utils/model_restrictions.py:51), so the env var was silently ignored. The downstream impact was exactly as you described: auto-mode could route EXTENDED_REASONING/FAST_RESPONSE to gpt-oss-120b or llama3.1-8b even when a Code-plan user tried to restrict to zai-glm-4.7.

Fix (smaller and lower-risk than restructuring the routing): added ProviderType.CEREBRAS: "CEREBRAS_ALLOWED_MODELS" to the centralized ENV_VARS mapping. This is the correct architectural location — it's where every other native provider is wired (OPENAI, GOOGLE, XAI, OPENROUTER, DIAL) — and it lets the existing _get_allowed_models_for_provider() filter naturally pre-filter the catalogue before get_preferred_model() ever sees it. No changes needed to the routing code itself.

Regression coverage added in the same commit:

  1. test_model_restrictions now asserts that paid-tier models (gpt-oss-120b, qwen-3-235b, llama3.1-8b) are explicitly rejected when only zai-glm-4.7 is allowlisted — not just that the allowed model passes.
  2. New test_restrictions_filter_auto_mode_routing test that exercises the full ModelProviderRegistry._get_allowed_models_for_provider()get_preferred_model() path with CEREBRAS_ALLOWED_MODELS=zai-glm-4.7 set, asserting all three categories (BALANCED, EXTENDED_REASONING, FAST_RESPONSE) return zai-glm-4.7 and never the paid-tier models.

Both tests would have caught this bug. Thanks!

return allowed_models[0]


# Load registry data at import time
CerebrasModelProvider._ensure_registry()
19 changes: 19 additions & 0 deletions providers/registries/cerebras.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""Registry loader for Cerebras model capabilities."""

from __future__ import annotations

from ..shared import ProviderType
from .base import CapabilityModelRegistry


class CerebrasModelRegistry(CapabilityModelRegistry):
"""Capability registry backed by ``conf/cerebras_models.json``."""

def __init__(self, config_path: str | None = None) -> None:
super().__init__(
env_var_name="CEREBRAS_MODELS_CONFIG_PATH",
default_filename="cerebras_models.json",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Package Cerebras model manifest with the distribution

This registry assumes cerebras_models.json is available at runtime, but the packaging metadata was not updated to ship that new manifest (the existing setuptools data-files list still omits it), so wheel installs end up without conf/cerebras_models.json. In that environment _load_config_data() falls back to an empty model list, leaving CerebrasModelProvider with no capabilities and breaking Cerebras model resolution/auto routing for pip-installed deployments.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks for the catch — fixed in de64532. Critical assessment: the underlying observation is correct, but the runtime impact statement is not.

Fixed: Added conf/cerebras_models.json to the [tool.setuptools.data-files] list in pyproject.toml for consistency with the other seven model manifests.

Verification: Rebuilt the wheel and confirmed cerebras_models.json now appears in both install locations:

$ python -m zipfile -l pal_mcp_server-9.8.2-py3-none-any.whl | grep cerebras_models
conf/cerebras_models.json                                       4343
pal_mcp_server-9.8.2.data/data/conf/cerebras_models.json        4343

Important nuance on the runtime impact claim: The PR did not actually break Cerebras for wheel installs as stated. The file was already shipped via the [tool.setuptools.package-data] glob ("conf/*.json", line 24 of pyproject.toml), which catches all conf JSONs including the new one. The runtime registry loader (providers/registries/base.py:46-54) uses importlib.resources.files("conf").joinpath(default_filename) which reads from the package-data location, not the data-files location, so _load_config_data() would have found the manifest correctly in any wheel install.

The wheel-build verification before the fix confirmed this:

$ python -m zipfile -l pal_mcp_server-9.8.2-py3-none-any.whl | grep cerebras_models
conf/cerebras_models.json                                       4343   ← already shipped

That said, the missing data-files entry was a real consistency oversight worth fixing — every other model manifest is listed there, and any deployment path that reads from <prefix>/conf/ (e.g. some uvx flows, or custom packagers) would have been inconsistent. So the fix is committed and the PR now matches the established pattern across all eight model manifests.

provider=ProviderType.CEREBRAS,
friendly_prefix="Cerebras ({model})",
config_path=config_path,
)
2 changes: 2 additions & 0 deletions providers/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class ModelProviderRegistry:
ProviderType.OPENAI, # Direct OpenAI access
ProviderType.AZURE, # Azure-hosted OpenAI deployments
ProviderType.XAI, # Direct X.AI GROK access
ProviderType.CEREBRAS, # Cerebras Inference (ZAI-GLM, GPT-OSS, Qwen3, Llama)
ProviderType.DIAL, # DIAL unified API access
ProviderType.CUSTOM, # Local/self-hosted models
ProviderType.OPENROUTER, # Catch-all for cloud models
Expand Down Expand Up @@ -336,6 +337,7 @@ def _get_api_key_for_provider(cls, provider_type: ProviderType) -> Optional[str]
ProviderType.OPENAI: "OPENAI_API_KEY",
ProviderType.AZURE: "AZURE_OPENAI_API_KEY",
ProviderType.XAI: "XAI_API_KEY",
ProviderType.CEREBRAS: "CEREBRAS_API_KEY",
ProviderType.OPENROUTER: "OPENROUTER_API_KEY",
ProviderType.CUSTOM: "CUSTOM_API_KEY", # Can be empty for providers that don't need auth
ProviderType.DIAL: "DIAL_API_KEY",
Expand Down
5 changes: 3 additions & 2 deletions providers/shared/provider_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class ProviderType(Enum):
OPENAI = "openai"
AZURE = "azure"
XAI = "xai"
OPENROUTER = "openrouter"
CUSTOM = "custom"
CEREBRAS = "cerebras"
DIAL = "dial"
CUSTOM = "custom"
OPENROUTER = "openrouter"
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ py-modules = ["server", "config"]
"conf/openai_models.json",
"conf/gemini_models.json",
"conf/xai_models.json",
"conf/cerebras_models.json",
"conf/dial_models.json",
]

Expand Down
29 changes: 27 additions & 2 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,12 +387,20 @@ def configure_providers():
"""
# Log environment variable status for debugging
logger.debug("Checking environment variables for API keys...")
api_keys_to_check = ["OPENAI_API_KEY", "OPENROUTER_API_KEY", "GEMINI_API_KEY", "XAI_API_KEY", "CUSTOM_API_URL"]
api_keys_to_check = [
"OPENAI_API_KEY",
"OPENROUTER_API_KEY",
"GEMINI_API_KEY",
"XAI_API_KEY",
"CEREBRAS_API_KEY",
"CUSTOM_API_URL",
]
for key in api_keys_to_check:
value = get_env(key)
logger.debug(f" {key}: {'[PRESENT]' if value else '[MISSING]'}")
from providers import ModelProviderRegistry
from providers.azure_openai import AzureOpenAIProvider
from providers.cerebras import CerebrasModelProvider
from providers.custom import CustomProvider
from providers.dial import DIALModelProvider
from providers.gemini import GeminiModelProvider
Expand Down Expand Up @@ -455,6 +463,13 @@ def configure_providers():
has_native_apis = True
logger.info("X.AI API key found - GROK models available")

# Check for Cerebras API key
cerebras_key = get_env("CEREBRAS_API_KEY")
if cerebras_key and cerebras_key != "your_cerebras_api_key_here":
valid_providers.append("Cerebras")
has_native_apis = True
logger.info("Cerebras API key found - Cerebras Inference models available")

# Check for DIAL API key
dial_key = get_env("DIAL_API_KEY")
if dial_key and dial_key != "your_dial_api_key_here":
Expand Down Expand Up @@ -513,6 +528,10 @@ def configure_providers():
ModelProviderRegistry.register_provider(ProviderType.XAI, XAIModelProvider)
registered_providers.append(ProviderType.XAI.value)
logger.debug(f"Registered provider: {ProviderType.XAI.value}")
if cerebras_key and cerebras_key != "your_cerebras_api_key_here":
ModelProviderRegistry.register_provider(ProviderType.CEREBRAS, CerebrasModelProvider)
registered_providers.append(ProviderType.CEREBRAS.value)
logger.debug(f"Registered provider: {ProviderType.CEREBRAS.value}")
if dial_key and dial_key != "your_dial_api_key_here":
ModelProviderRegistry.register_provider(ProviderType.DIAL, DIALModelProvider)
registered_providers.append(ProviderType.DIAL.value)
Expand Down Expand Up @@ -600,7 +619,13 @@ def cleanup_providers():

# Validate restrictions against known models
provider_instances = {}
provider_types_to_validate = [ProviderType.GOOGLE, ProviderType.OPENAI, ProviderType.XAI, ProviderType.DIAL]
provider_types_to_validate = [
ProviderType.GOOGLE,
ProviderType.OPENAI,
ProviderType.XAI,
ProviderType.CEREBRAS,
ProviderType.DIAL,
]
for provider_type in provider_types_to_validate:
provider = ModelProviderRegistry.get_provider(provider_type)
if provider:
Expand Down
1 change: 0 additions & 1 deletion simulator_tests/test_chat_simple_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
- Conversation context preservation across turns
"""


from .conversation_base_test import ConversationBaseTest


Expand Down
1 change: 0 additions & 1 deletion simulator_tests/test_conversation_chain_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
- Properly traverse parent relationships for history reconstruction
"""


from .conversation_base_test import ConversationBaseTest


Expand Down
1 change: 0 additions & 1 deletion simulator_tests/test_cross_tool_comprehensive.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
5. Proper tool chaining with context
"""


from .conversation_base_test import ConversationBaseTest


Expand Down
1 change: 0 additions & 1 deletion simulator_tests/test_ollama_custom_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
- Model alias resolution for local models
"""


from .base_test import BaseSimulatorTest


Expand Down
Loading
Loading