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

# Get Model Limit • Rust AI Agent SDK

> get_model_limit: Get context limit for a model.

# get\_model\_limit

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**context**](../modules/context) module.

Get context limit for a model.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def get_model_limit(model: &str) -> usize
```

## Parameters

<ParamField query="model" type="&str" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="usize">
  The result of the operation.
</ResponseField>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/context/mod.rs#L278">
  `praisonai/src/context/mod.rs` at line 278
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust LLM" icon="microchip" href="/docs/rust/llm" />

  <Card title="Rust Providers" icon="server" href="/docs/rust/providers" />
</CardGroup>
