> ## Documentation Index
> Fetch the complete documentation index at: https://docs.guild.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Qwen

> Use Qwen models from Alibaba in your Guild agents: supported models, inference providers, setup, and agent code.

Guild supports Qwen models from Alibaba. This page lists the models Guild recognizes, the inference providers that serve them, and how to call them from an agent.

| | |
| - | - |
| Name under **Models** in the credential form | Alibaba |
| `provider` in `llmPreferences` | `"alibaba"` |
| Default model | `qwen3-next-80b-a3b` |
| Managed access | No. Add your own credential (BYOK). |

## Inference providers

Qwen models are served only through third-party inference providers, not a Qwen API.

| Provider | Notes |
| - | - |
| [AWS Bedrock](/platform/providers/aws-bedrock) | The only provider with `qwen3-next-80b-a3b`, the default. Region availability varies by model. |
| [OpenRouter](/platform/providers/openrouter) | Served under OpenRouter's `qwen/` namespace. It has no plain `qwen3-next-80b-a3b`, so choose another default, such as `qwen3-next-80b-a3b-instruct` or `qwen3-coder`. |
| [Fireworks AI](/platform/providers/fireworks) | Serves `qwen3.8-max` and `qwen3.8-2.4t-a95b` only. |

Write the canonical model name, such as `qwen3-next-80b-a3b`, everywhere in Guild. Guild maps it to each provider's own model ID.

## Models

Guild prices and recognizes these Qwen model IDs. A policy or preference can also name any other model your credential can reach. Third-party providers route more models than this list, and their catalogs change; see each provider's page for what it serves.

| Model | Notes |
| - | - |
| `qwen3-next-80b-a3b` | The default. Served by Bedrock. |
| `qwen3-coder-480b-a35b` | Served by Bedrock. |
| `qwen3-coder-next` | Served by Bedrock. |
| `qwen3-32b` | Served by Bedrock. |
| `qwen3.8-max` | Served by Fireworks AI. |
| `qwen3.8-2.4t-a95b` | Served by Fireworks AI. |

## Set up Qwen

Guild has no managed key for Qwen. To use Qwen models, add a credential for a provider that serves them. Adding your first credential switches the whole account to bring your own key (BYOK).

<Steps>
  <Step title="Open Models & providers">Click **Access & setup** in the left nav, then **Models & providers**. In an organization, only admins can open it.</Step>
  <Step title="Add a credential">Click **Add API key** and choose an inference provider from the table above.</Step>
  <Step title="Enter the provider's secret">Give the credential a **Name** and paste your provider's **API key**. [AWS Bedrock](/platform/providers/aws-bedrock) asks for an IAM role and region instead.</Step>
  <Step title="Choose Alibaba">Under **Models**, check **Alibaba**. Keep `qwen3-next-80b-a3b` as its default model or enter another from the list above. Then click **Add Key**. On [Fireworks AI](/platform/providers/fireworks), pick a model from its list, because the pre-filled default isn't available there.</Step>
</Steps>

To control which workspaces and agents can use Qwen models, add a [model policy](/platform/llm-settings#model-policies) for the credential. For example, `--models "qwen3-coder-*"` limits a policy to matching models:

```bash theme={null}
guild llm policy create --credential <credential-id> --publisher ALIBABA --target-id <workspace-or-agent-id> --models "qwen3-coder-*"
```

## Use it from an agent

Agent code never names a credential. Guild resolves the call against the workspace owner's settings. To ask for Qwen explicitly, put it in `llmPreferences`:

```typescript theme={null}
const result = await task.llm.generateText({
  prompt: "Summarize this text...",
  llmPreferences: [
    { provider: "alibaba", model: "qwen3-coder-480b-a35b" },
    { provider: "alibaba" },
  ],
})
```

The first entry asks for `qwen3-coder-480b-a35b`. The second falls back to the default model of the matching policy. Preferences are strict: if no credential or policy allows any of them, the call fails rather than using another publisher. See [LLM preferences](/guide/llms#llm-preferences).

<Note>The `"alibaba"` provider value needs `@guildai/agents-sdk` 0.7.6 or later.</Note>

## Related pages

* [Models & providers](/platform/llm-settings) for credentials, model policies, and the daily token limit
* [LLMs](/guide/llms) for `task.llm` and the unified LLM proxy
* [Usage](/insights/usage) for spend by model
