# Defaulting to the same model - Smolagents

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdefaulting-to-the-same-model-smolagents%2F166171%3E%5C
**Category:** Beginners\
**Created:** [August 8, 2025, 11:09pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdefaulting-to-the-same-model-smolagents%2F166171 "2025-08-08T23:09:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsemrau](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/jsemrau/32/26919_2.png) [@jsemrau](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fjsemrau)%5C
**Post date:** [August 8, 2025, 11:09pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdefaulting-to-the-same-model-smolagents%2F166171%2F1 "2025-08-08T23:09:51Z")

</div>

I built an agent and wanted to benefit from the development of newer models. But whichever provider or model provider I use (as selected on this matrix ( [Hugging Face Inference Providers · Supported Models](https://huggingface.co/inference/models) )),

the script below always defaults to Qwen/Qwen2.5-Coder-32B-Instruct. Why?

How can I change it?

```auto
llm_engine = InferenceClientModel(
                api_key=HF_TOKEN,
                model="Qwen/Qwen3-235B-A22B-Instruct-2507" , #"openai/gpt-oss-120b" , #"moonshotai/Kimi-K2-Instruct",
                timeout=3000,
                provider="together",
                temperature=0.1
            )
        
 # Initialize agent
 agent = CodeAgent(
            model=llm_engine,
            tools=[],
            add_base_tools=False,
            name="data_agent",
            description="Runs data analysis for you.",
            max_steps=1,
        )

```

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [August 8, 2025, 11:52pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdefaulting-to-the-same-model-smolagents%2F166171%2F2 "2025-08-08T23:52:35Z")

</div>

This should fix it. I think the rest is correct.

```py
llm_engine = InferenceClientModel(
                api_key=HF_TOKEN,
                #model="Qwen/Qwen3-235B-A22B-Instruct-2507" , #"openai/gpt-oss-120b" , #"moonshotai/Kimi-K2-Instruct",
                model_id="Qwen/Qwen3-235B-A22B-Instruct-2507" , #"openai/gpt-oss-120b" , #"moonshotai/Kimi-K2-Instruct",
                timeout=3000,
                provider="together",
                temperature=0.1
            )

```

> **[Models](https://huggingface.co/docs/smolagents/en/reference/models#smolagents.InferenceClientModel)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

---

<div class="post-metadata">

**Author:** ![jsemrau](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/jsemrau/32/26919_2.png) [@jsemrau](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fjsemrau)%5C
**Post date:** [August 9, 2025, 12:01am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdefaulting-to-the-same-model-smolagents%2F166171%2F3 "2025-08-09T00:01:46Z")

</div>

Thank you! That solved it.
