def _create_openrouter_model(model_name: str):
    """Helper function to create an OpenRouter model with specified model name."""
    api_key = Configuration.get("OPENROUTER_API_KEY")
    if not api_key:
        return None, {"status_code": 401, "detail": "No API key provided. Please set OPENROUTER_API_KEY in your configuration."}
    
    # If model_name starts with openrouter/, remove it
    if model_name.startswith("openrouter/"):
        model_name = model_name.split("openrouter/", 1)[1]
    
    return OpenAIModel(
        model_name,
        provider=OpenAIProvider(
            base_url='https://openrouter.ai/api/v1',
            api_key=api_key
        )
    ), None
Helper function to create an OpenRouter model with specified model name.
src/upsonic/server/level_utilized/utility.py