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

# Use Fireworks AI models in Nexus BYOC

> Add Fireworks AI models to your Nexus BYOC inference catalog, deploy them, and set them as the default models for each work area.

> [!NOTE]
>
> Nexus BYOC is available only on [Enterprise plans](https://www.pinecone.io/pricing/).

This guide adds Fireworks AI models to the inference catalog of a Pinecone Nexus Bring Your Own Cloud (BYOC) deployment, deploys them, makes them the default models, and queries Nexus with them. It works for an existing deployment and for a new one before your first `pulumi up`. For how Fireworks fits into Nexus, see the [overview](https://docs.pinecone.io/guides/nexus/byoc/fireworks/overview.md). For what each catalog field does, see the [reference](https://docs.pinecone.io/guides/nexus/byoc/fireworks/reference.md).

## Prerequisites

* A Pinecone Enterprise plan with Nexus BYOC, and a Nexus BYOC project generated by the setup wizard. To create one, see [Deploy Nexus BYOC](https://docs.pinecone.io/guides/nexus/byoc/deploy.md).
* A Fireworks API key. To create one, sign in to the [Fireworks API keys page](https://app.fireworks.ai/settings/users/api-keys).
* Pulumi, uv, and Python 3.12 or later, which the Nexus BYOC install also requires.
* Your Pinecone API key and your Nexus workspace host, for the query step.

## Set up your environment

### 1. Change to your Nexus BYOC project

```bash Terminal theme={null}
cd pinecone-nexus-byoc
```

### 2. Set your Fireworks API key

```bash Terminal theme={null}
export FIREWORKS_API_KEY="YOUR_FIREWORKS_API_KEY"
```

## Add the models to your catalog

The setup wizard writes the inference catalog to `inference-proxy-models.toml` in your project. Replace the contents of that file with the following. This catalog keeps the Pinecone-hosted embedding and rerank models. If contexts in an existing deployment use another embedding model, keep its entry too.

```toml inference-proxy-models.toml expandable theme={null}
# --- Model catalog -------------------------------------------------------
[llm_models."glm-5p3-flash"]
api_style         = "openai"
model             = "accounts/fireworks/models/glm-5p3-flash"
base_url          = "https://api.fireworks.ai/inference/v1"
api_key_ref       = "fireworks-api-key"
label             = "GLM 5.3 Flash (Fireworks)"
provider          = "fireworks"
context_window    = 1_048_576
max_output_tokens = 128_000
input_price_per_mtok      = 0.15
cache_read_price_per_mtok = 0.03
output_price_per_mtok     = 0.50

[llm_models."deepseek-v4p1-flash"]
api_style         = "openai"
model             = "accounts/fireworks/models/deepseek-v4p1-flash"
base_url          = "https://api.fireworks.ai/inference/v1"
api_key_ref       = "fireworks-api-key"
label             = "DeepSeek V4.1 Flash (Fireworks)"
provider          = "fireworks"
context_window    = 1_048_576
max_output_tokens = 128_000

[llm_models."glm-5p3"]
api_style         = "openai"
model             = "accounts/fireworks/models/glm-5p3"
base_url          = "https://api.fireworks.ai/inference/v1"
api_key_ref       = "fireworks-api-key"
label             = "GLM 5.3 (Fireworks)"
provider          = "fireworks"
context_window    = 1_048_576
max_output_tokens = 128_000
no_vision         = true

[llm_models."kimi-k3"]
api_style         = "openai"
model             = "accounts/fireworks/models/kimi-k3"
base_url          = "https://api.fireworks.ai/inference/v1"
api_key_ref       = "fireworks-api-key"
label             = "Kimi K3 (Fireworks)"
provider          = "fireworks"
context_window    = 1_048_576
max_output_tokens = 128_000
input_price_per_mtok      = 3.00
cache_read_price_per_mtok = 0.30
output_price_per_mtok     = 15.00

# Keep the shipped Pinecone-hosted embedding and rerank models.
[embedding_models.multilingual-e5-large]
api_style       = "pinecone"
model           = "multilingual-e5-large"
dimension       = 1024
max_input_chars = 1000
max_batch_size  = 96

[rerank_models.bge-reranker-v2-m3]
api_style            = "pinecone"
model                = "bge-reranker-v2-m3"
max_query_chars      = 1000
max_doc_chars        = 800
max_docs_per_request = 100

# --- Default profile -----------------------------------------------------
[default]
supported_llm_models       = ["glm-5p3-flash", "deepseek-v4p1-flash", "glm-5p3", "kimi-k3"]
supported_embedding_models = ["multilingual-e5-large"]
supported_rerank_models    = ["bge-reranker-v2-m3"]

[default.llm.tiers.lite]
model_ref = "glm-5p3-flash"

[default.llm.tiers.standard]
model_ref = "glm-5p3"

[default.llm.tiers.pro]
model_ref = "kimi-k3"

[default.embedding.tiers.default]
model_ref = "multilingual-e5-large"

[default.rerank.tiers.default]
model_ref = "bge-reranker-v2-m3"

[default.llm.phase_defaults]
search = "kimi-k3"
curate = "glm-5p3-flash"
agent  = "glm-5p3-flash"
```

### Default models

`[default.llm.phase_defaults]` sets the default model for each work area:

* **Query (`search`):** Answers queries and runs Optimize. This catalog uses `kimi-k3`.
* **Curation (`curate`):** Builds artifacts from your sources. Curation reads every source, so choose a fast, low-cost model such as `glm-5p3-flash` or `deepseek-v4p1-flash`. This default is the model curation runs on, so it's your main control over curation cost.
* **System (`agent`):** Runs background workflows, such as Explore. This catalog uses `glm-5p3-flash`.

To run a query on another model, such as `glm-5p3`, select it in the model selector on a context's **Query** tab or name it in the query's `model` field, as shown in [Query Nexus with a Fireworks model](#query-nexus-with-a-fireworks-model).

### Vision and pricing

* `glm-5p3` is text-only, so its entry sets `no_vision = true`.
* `glm-5p3-flash` and `kimi-k3` carry prices, so usage reports their cost. To report cost for `glm-5p3` and `deepseek-v4p1-flash`, add their prices from [Fireworks pricing](https://fireworks.ai/pricing).

### Keep the Gemini models

To keep the shipped Gemini models next to the Fireworks models, copy their entries from the original file and add their IDs to `supported_llm_models`. Each provider uses its own `api_key_ref`.

## Store your Fireworks API key

Store your Fireworks API key as the stack secret that matches the `api_key_ref` in the catalog:

```bash Terminal theme={null}
pulumi config set --path --secret nexus-provider-keys.fireworks-api-key "$FIREWORKS_API_KEY"
```

If you use the local Pulumi backend, export `PULUMI_CONFIG_PASSPHRASE` before you run `pulumi` commands.

## Validate and deploy the catalog

### 1. Validate the catalog

Run the validation script the setup wizard ships in your project. For each model, it checks the catalog fields and sends one small live request with your key:

```bash Terminal theme={null}
uv run --no-project --with 'litellm==1.96.2' --python 3.12 python validate_models.py
```

The output looks like this:

```text Output theme={null}
  Nexus inference-model validation

  ✓ chat 'glm-5p3-flash': reachable, key accepted
  ✓ chat 'deepseek-v4p1-flash': reachable, key accepted
  ✓ chat 'glm-5p3': reachable, key accepted
  ✓ chat 'kimi-k3': reachable, key accepted
  ✓ embedding 'multilingual-e5-large': reachable, key accepted; dimension 1024 matches
  ✓ rerank 'bge-reranker-v2-m3': reachable, key accepted

  ✓ All inference models passed.
    Note: this is only a lightweight sanity ping (one tiny request per model) — it confirms the key, endpoint and model id.
```

A project generated by an older setup wizard has an older copy of the script, which can't check Fireworks embedding models. To update it, copy [`setup/validate_models.py`](https://github.com/pinecone-io/pulumi-pinecone-nexus-byoc/blob/main/setup/validate_models.py) from the deployment repository into your project.

### 2. Deploy the catalog

Run `pulumi up` to ship the catalog to the inference proxy as a ConfigMap and store your Fireworks API key as a Kubernetes secret:

```bash Terminal theme={null}
pulumi up
```

## Check your defaults

In the Nexus console, open **Settings** and select the **Deployment** tab. The **Default models** card shows the default for each work area, read-only, because the catalog reapplies `phase_defaults` on every settings pull. To change a default, edit `phase_defaults` and run `pulumi up` again.

## Query Nexus with a Fireworks model

A query runs on the Query default unless it names a model by catalog ID in the `model` field. The response names the model that answered.

### 1. Set your Pinecone API key and base URL

Install `requests`, and set your Pinecone API key and your workspace's API base URL. Your workspace host is the base of `nexus_default_workspace_data_console_url` in the `pulumi up` output.

```bash Terminal theme={null}
pip install requests
export PINECONE_API_KEY="YOUR_PINECONE_API_KEY"
export NEXUS_BASE_URL="https://YOUR_WORKSPACE_HOST/api"
```

### 2. Run a query

The following code lists the catalog and the work-area defaults, then asks a question that names `kimi-k3`:

```python Python theme={null}
import os

import requests

NEXUS_URL = os.environ["NEXUS_BASE_URL"]
HEADERS = {
    "Api-Key": os.environ["PINECONE_API_KEY"],
    "X-Pinecone-Api-Version": "2026-07",
}

resp = requests.get(f"{NEXUS_URL}/models", headers=HEADERS, timeout=30)
resp.raise_for_status()
catalog = resp.json()
print("Defaults:", catalog["phase_defaults"])
for model in catalog["models"]:
    print(f"  {model['id']:<22} {model['provider']:<10} available={model['available']}")

response = requests.post(
    f"{NEXUS_URL}/query",
    headers=HEADERS,
    json={
        "ask": "What changed in our refund policy this year?",
        "scope": ["support-docs"],
        "model": "kimi-k3",
    },
    timeout=900,
)
response.raise_for_status()
query = response.json()

answer = "".join(
    part["text"]
    for item in query["output"]
    for part in item.get("content", [])
    if part.get("type") == "output_text"
)
print(f"\nAnswered by: {query['model']}\n\n{answer}\n")
for citation in query["citations"]:
    print("Source:", citation.get("source_path") or citation.get("source"))
print("Usage:", query["usage"])
```

Replace `support-docs` with the slug of one of your contexts.

### Compare models

For a model with prices in the catalog, `usage.cost_usd` in the response reports the query's cost. To compare models on your own questions, open each query's [trace](https://docs.pinecone.io/guides/nexus/query-tracing.md) with `GET /queries/{id}/trace`, which reports the steps, tokens, and latency behind the answer.

A tested run used a BYOC deployment with GLM 5.3 Flash as the Curation default and Kimi K3 as the Query default. Curating one source (`Pinecone_Architecture.pdf`) produced 22 artifacts and 72 edges in about two minutes, at a cost of \$0.03. Embeddings stayed on `multilingual-e5-large`. A query with Kimi K3 answered "How does Pinecone do compaction?" from the PDF and cited it, in 20 steps with two tool calls and about 17 seconds.

## Use Fireworks for embeddings (optional)

You can also route embeddings to Fireworks. Existing contexts keep the embedding model they were built with, and only new contexts use the new default.

### 1. Add the embedding model to your catalog

Add the following entry to `inference-proxy-models.toml`:

```toml inference-proxy-models.toml theme={null}
[embedding_models."qwen3-embedding-8b"]
api_style       = "openai"
model           = "accounts/fireworks/models/qwen3-embedding-8b"
base_url        = "https://api.fireworks.ai/inference/v1"
api_key_ref     = "fireworks-api-key"
provider        = "fireworks"
dimension       = 4096
max_input_chars = 8000
max_batch_size  = 64
```

Then add `qwen3-embedding-8b` to `supported_embedding_models` and make it the default embedding model. Keep `multilingual-e5-large` in the list, because contexts look up their embedding model by ID at query time:

```toml inference-proxy-models.toml theme={null}
[default]
supported_embedding_models = ["multilingual-e5-large", "qwen3-embedding-8b"]

[default.embedding.tiers.default]
model_ref = "qwen3-embedding-8b"
```

### 2. Validate the embedding model

Run the validation script again to confirm the returned vectors match `dimension`:

```bash Terminal theme={null}
uv run --no-project --with 'litellm==1.96.2' --python 3.12 python validate_models.py
```

### 3. Deploy the change

Run `pulumi up` to ship the updated catalog:

```bash Terminal theme={null}
pulumi up
```

## Next steps

* Compare Fireworks models on your own questions with [query traces](https://docs.pinecone.io/guides/nexus/query-tracing.md), then update `phase_defaults` in your catalog.
* [Fine-tune a model on Fireworks](https://docs.fireworks.ai/fine-tuning/fine-tuning-models) and [deploy it](https://docs.fireworks.ai/fine-tuning/deploying-loras), then add it to the catalog with `model` set to `accounts/<account-id>/models/<model-id>`.
