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

# Online scoring rule failing after SDK update

> [!NOTE]
>
> **Applies to:**
>
> * Plan - Any
> * Deployment - Any
> *
> * Use case - Online scoring with code-based scorers uploaded using older SDK versions

## Summary

Code-based scorers fail in online scoring rules with the error:

```text theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
The following keys are not permitted {'_bt_internal_override_pagination_key'}

```

Even though the scorer tests successfully. This occurs when a code based scorer that was uploaded using an older Python SDK version that includes internal keys incompatible with the current runtime environment.

## Resolution Steps

### Step 1: Update the Python SDK

Upgrade to Python SDK version 0.5.2 or later.

```text theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
pip install --upgrade braintrust==0.5.2

```

### Step 2: Re-upload the scorer

Upload the scorer again using the updated SDK version. The scorer code itself doesn't need to change.

```python theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
import braintrust

project = braintrust.projects.create(name="my-project")

# Re-upload your existing scorer with the updated SDK
project.scorers.create(
    name="my-scorer",
    function=my_scorer_function
)

```

### Step 3: Test the online scoring rule

Verify the scorer now works correctly in the online scoring rule without the pagination key error.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.