Skip to main content

Error reference

This page is the lookup table for an error the gateway returned. Find the HTTP status, then the message, and the row tells you what happened and what to change. It covers the errors the gateway raises itself on model routes and management routes. Errors a provider raised and the gateway passed through keep the provider's status. Their type is one of the OpenAI style types in exception classes, and their message starts with the exception class name, for example spanway.RateLimitError: .... Exception mapping explains how those map onto the SDK exception classes.

A real-world scenario​

A developer's script prints {"error": {"message": "Budget has been exceeded! Key=sk-...abcd Current cost: 50.12, Max budget: 50.0", "type": "budget_exceeded", "param": null, "code": "422"}}. They search this page for budget_exceeded, read that the key spent its max_budget and that an admin can raise it or wait for the budget to reset, and ask their team admin instead of retrying for an hour.

Reading an error​

Model routes such as /v1/chat/completions answer with the OpenAI error shape. code is the HTTP status as a string, and type is the gateway's error type from the tables below. When the provider raised the error, type is invalid_request_error, authentication_error, permission_error, throttling_error (a provider rate limit) or internal_server_error, and the exception class name starts the message, see exception classes.

{
"error": {
"message": "Authentication Error, Invalid proxy server token passed. Unable to find token in cache or `Spanway_VerificationTokenTable`",
"type": "token_not_found_in_db",
"param": "key",
"code": "401"
}
}

Management routes such as /key/generate, /audit or /email/event_settings answer with a detail field that is either a string or an object with an error message.

{"detail": {"error": "Admin-only endpoint. Not allowed to access this."}}

The website assistant routes under /public/assistant answer with a small {"kind": "...", "retry_after": ...} body that never carries provider error text.

MCP tools report their own errors inside an HTTP 200, as a tool result with isError true and one line of text. The tool search errors and the admin MCP server errors list those lines, and the admin MCP server's startup errors list the settings that stop the gateway from starting.

A body that fails validation on any route answers 422 with a detail list that names the field (loc), the problem (msg) and the rule (type).

Every response carries an x-spanway-call-id header. Send it to support@spanway.ai or search for it on the Logs page to find the request behind an error.

400 Bad Request​

Type or messageMeaningCausesFix
bad_request_errorThe request is well formed JSON but the gateway cannot act on it.A parameter the route does not take, a model name with the wrong shape, a filter that contradicts another.Read the message, which names the field.
Invalid model name passed in model=<name>No deployment serves that model name.A typo, or the model is not in the config or the database.Call GET /v1/models with the same key to see the names it may use.
Provider invalid_request_error, ContextWindowExceededError, ContentPolicyViolationError, UnsupportedParamsErrorThe provider refused the request.The prompt is longer than the context window, the content filter fired, or a parameter is unsupported.Shorten the prompt, change the content, or set drop_params, see drop params.
no_db_connection, No connected db.The gateway cannot check the key because it has no database. Any key other than the master key gets this, before its format is checked.DATABASE_URL is unset and the key is not the master key.Set DATABASE_URL, or use the master key.
since must not be later than untilGET /audit/verify got an inverted window.The two dates were swapped.Swap them back.
Service must be in list. Service=<name> not in [...]GET /health/services got a service it cannot test.A typo in the service name.Use one of the names in the message.
<section> <key> set in the config file and cannot be changed hereA setting is fixed in the config file and the Admin UI or API may not override it.The same key exists in config.yaml.Change it in the config file, or remove it from there to manage it in the database.
A message naming a destination field and a secret fieldA callback's host, URL, endpoint or site changed while its stored secret was kept.Editing a callback without retyping its key.Retype the secret together with the new destination, see logging.
team_member_already_in_teamThe user is already a member of the team.Adding the same member twice, or an SSO or SCIM sync that already added them.Nothing to fix. Change the member's role with /team/member_update instead.
{"kind": "invalid_request"}The website assistant refused the chat or search request.An empty message or one over 2,000 characters, a body over 24 KB or without Content-Length, unknown fields, a state over 8,192 characters, a page that is not a path starting with / (letters, digits and . _ ~ / - only, at most 256 characters), or a search q that is missing, empty or over 300 characters.Send {"message": "..."} with optional state and page, see website assistant errors.
This MCP server does not support BYOK credentialsPOST /v1/mcp/server/{server_id}/user-credential named a server that takes no personal keys.The server's BYOK (Bring Your Own Key) switch is off.Turn it on for the server, or use its shared credential, see per-user credentials.
User ID not found in tokenA personal MCP key route got a virtual key that belongs to no user.A service key or a key created without user_id.Use a key that belongs to a user, or connect from the Admin UI, see per-user credentials.
run <id> is <status>, only a pending or running run can be cancelledA red team run that already finished was asked to cancel.Cancelling a completed, failed or cancelled run.Nothing to cancel. Delete the run instead if it should go, see red team errors.
run <id> is <status>, cancel it firstA red team run that is still pending or running was asked to delete.Deleting an active run.Cancel it, then delete it.
Preset '<name>' lists no models, so the request must name one, for example 'my-model@preset/<name>'The preset leaves the model to the caller and the request named only the preset.A body with model: "@preset/<name>" on such a preset, on a model route or on POST /v1/inspect.Put a model in front of the preset, or add models to the preset, see request inspector.
Team '<alias>' does not exist. Reference an existing team or use a wildcard pattern ...A policy attachment names a team, key alias or model that does not exist.A typo, or the team was deleted.Fix the alias, or end it with * to make it a pattern, see guardrail policies.
max_key_lifetime_days must be a whole number of days from 1 to 3650. Received: <value>An organization create or update carried a key lifetime the gateway cannot apply.A text value such as "90 days", 0, a fraction or a value above 3650.Send a whole number of days, or null to remove the limit, see leaked keys and key expiry.
Invalid <setting>: <field>: <rule>A setting saved with POST /config/field/update or from the Admin UI has a nested value out of range, for example Invalid key_hygiene: max_lifetime_days: Input should be greater than or equal to 1.A number outside the range the message names.Fix the field the message names and save again. The setting applies at once.
red teaming needs the evals extra installed on the proxyThe gateway image has no red team components.A build without the evals extra.Use a Spanway image, which bundles them.
a run needs vulnerabilities or a framework, see GET /eval/redteam/catalogueA red team run named nothing to probe.An empty vulnerabilities list and no framework.Tick vulnerabilities or pick a preset, see framework presets.
framework <id> chooses the vulnerabilities and attacks, leave both emptyA red team preset was sent together with its own vulnerabilities or attacks.Mixing a preset with hand-picked lists.Send the preset alone, or leave framework out.
framework <id> sends the prompts you supply, add at least one to prompts or prompts are sent only by a dataset framework, set framework to aegis or beavertailsA dataset preset came without prompts, or prompts came without one.Forgetting the exported dataset rows, or sending them to a category preset.Send prompts with aegis or beavertails only, see red team errors.
scorer: tool_permission needs allowed_tools, denied_tools or bothThe tool permission scorer has nothing to check against.Both tool lists empty.Name the tools to allow or deny, see agent checks.
scorers[<n>]: <scorer> needs audio, which live traffic does not carryA voice scorer was put on an online scoring rule.Live requests carry no recording.Score recorded calls in a dataset run in logged mode instead.
skill_scan_blocked, The skill was refused because a guardrail blocked it (scan <id>) ...A guardrail blocked a file of an uploaded skill or a marketplace plugin, or would have rewritten it, so nothing was stored.Prompt injection, a secret or another finding in SKILL.md, a bundled script or the plugin manifest.Remove what the message names and upload again, see skill scanning errors.
skill_scan_incomplete, The skill was refused because the gateway could not check every file and skill scanning is set to fail closed (scan <id>) ...A file could not be checked, and skill_scan_mode is fail_closed.A binary or non UTF-8 file, a file over 512 KiB, an unsafe path in a zip, an upload past the scan budget, a guardrail outage, a name in skill_scan_guardrails that is not set up, or a skill scanning setting that cannot be read.Fix the file or the guardrail name, see skill scanning errors.
skill_scan_unsupported, Skills can only be added through the pass-through route with a multipart POST to v1/skills or v1/skills/{skill_id}/versions ...A change to skills through the Anthropic pass-through route was refused before it reached the provider.A PUT or PATCH to a skills path, a POST to another skills path, or a skill sent as JSON.Upload with POST /v1/skills, or send multipart form data to one of the two paths, see skill scanning errors.
403 Only proxy admins and admin viewers can read skill scan resultsGET /skill-scans was refused.The key is not a proxy admin or admin viewer key, and no custom role grants guardrails.read.Use an admin key, or grant the role guardrails.read, see skill scanning errors.
500 Skill scan results need a database, and this gateway runs without oneGET /skill-scans was refused.The gateway runs without a database.Connect a database. Scans still run and refuse blocked uploads without one, but no result is kept, see skill scanning errors.
No deployment of model '<model>' satisfies the provider preferences: <reason>The provider preferences of the request, key, team or preset left no deployment.only names a provider the group lacks, or max_price excludes every deployment.Loosen the preferences, or add a deployment that meets them.
Invalid request field 'provider': ..., Invalid key metadata.provider_preferences: ... or Invalid team metadata.provider_preferences: ...A provider preferences object breaks a rule.An unknown field, a wrong type, an empty max_price, or sort.partition: none.Fix the field the message names, see provider preferences.
'@preset/<name>' is not a valid preset reference. ...The name after @preset/ breaks the naming rule.Capitals, spaces or other characters.Use the preset name exactly as saved, see routing presets.
'@tier/<name>' names no tier. Use @tier, @tier/economy, @tier/balanced or @tier/frontier, The budget tier policy maps no routing preset to the '<tier>' tier, @tier needs a key that belongs to a team or an organization or Send either model @tier or a preset field, not bothA request that asks for a budget tier cannot be served as sent.A misspelled tier, a tier the policy leaves empty, a key with no team or organization, or a preset field next to @tier.Fix the model name, map the tier to a preset, or use a team key.
Routing preset '<name>' does not exist for team '<team>' or globally or ... does not exist globallyA budget tier policy names a routing preset its team or organization cannot use.A typo, or a team preset given to an organization policy.Create the preset first, or use a global preset, see budget tiers.
Context compaction: context_fit must be true, false, "middle_out" or an object with a strategy or Context compaction: ... only accepts the middle_out strategyA request, key or team fit to context value cannot be used. Saving such a key or team is refused with the same 400.A typo, or summarize outside router_settings and deployments.Send true, false or "middle_out".
Context compaction: The output allowance must be a positive integerFit to context could not work out how much room the answer needs.max_tokens or a similar field is 0 or negative.Send a positive number, or leave it out.
metadata: ... naming structured_output_repair or structured_output_max_retriesA key or team was saved with a structured output repair value the gateway does not accept.A typo in the mode, or a retry count outside 0 to 5.Use a listed value.
Not a configured auto-router: '<name>', ... not on this proxy: ... or judge_model '<model>' ... on POST /auto_router/shadow_eval/startA shadow eval names a router, target, judge or baseline the gateway cannot use.A typo, a key named by its sk- value instead of its hash, or a judge that serves one of the arms.Fix the field the message names.
validation_error, Unsupported router settings: <keys> are not valid router settingsPOST /config/update got a router_settings key the router does not have, or one managed on another page.A typo, or an old setting name.Check the name against GET /router/fields, see Router Settings.
validation_error, Invalid config: <section>.<key>: <rule>POST /config/update, which the Admin UI settings pages save with, got a value the setting cannot hold, for example Invalid config: general_settings.public_assistant_origins: Input should be a valid array. Nothing is saved.Text where the setting takes a list of values, a number outside its range, or a body that is not valid JSON.Fix the value of the setting the message names and save again. A list setting such as public_assistant_origins takes a JSON list, for example ["https://www.example.com"].

401 Unauthorized​

Type or messageMeaningCausesFix
auth_error, Spanway Virtual Key expected. The key is expected to start with 'sk-'.The key does not look like a virtual key at all, so the gateway refused it before looking it up.A provider key (for example an OpenAI or Anthropic key) sent to the gateway instead of a virtual key, a key copied with a missing prefix, or a JWT while JWT auth is off, in which case the message adds a hint about JWT auth.Send a virtual key that starts with sk-, created in Virtual Keys or with /key/generate. To sign in with JWTs, turn on JWT auth. The gateway logs this one as a quiet WARNING, see the log reference.
token_not_found_in_db, Authentication Error, Invalid proxy server token passed. Unable to find token in cache or Spanway_VerificationTokenTableThe key starts with sk- and passed the format check, but no key in the database has its hash. param is key.A wrong, deleted or regenerated key, a key from another gateway's database, or a key copied with a character missing.Create a key with /key/generate or in Virtual Keys and send it as Authorization: Bearer <key>, or check that the gateway points at the right database.
expired_key, Authentication Error - Expired Key. Key Expiry time <time> and current time <time>The key's expires date has passed.A key created with a duration, or shortened by the key lifetime cap.Create a new key or extend this one with /key/update.
key_vector_store_access_denied, team_vector_store_access_denied, user_vector_store_access_deniedThe key, team or user may not use that vector store. This happens when its vector store list does not include the store, whatever vector_store_deny_by_default says, and also when it has no list at all while vector_store_deny_by_default is on. org_vector_store_access_denied is reserved and not raised today.A vector store that was never granted to the caller, or a list that names other stores only.Grant the vector store on the key or team in Virtual Keys or Teams, or with object_permission.vector_stores on /key/update.
auth_error, Authentication Error, Rejected Request: <field> is not allowed in request body. Clientside passthrough requires explicit admin opt-in ...The request carried a field that only the gateway's own settings may decide, such as api_base, a logging callback's credentials or turn_off_message_logging.A client sent the field, or the website assistant called a model that does not list turn_off_message_logging in configurable_clientside_auth_params.Remove the field from the request, or as a proxy admin add the field to configurable_clientside_auth_params on that model, which allows it for that model only.
auth_error, Authentication Error, <reason>Any other reason the key could not be checked.A blocked key, a blocked team, a JWT that does not validate.The reason follows the prefix. Fix what it names. An address outside an IP allow list is a 403, see below.
Authentication Error, Token is not activeOAuth2 introspection says the token was revoked or has expired.The identity provider ended the token.Get a new token from the identity provider, see OAuth2 auth.
Authentication Error, Oauth 2.0 Token validation failed: <reason> or An error occurred during token validation: <reason>The introspection or token info endpoint refused the token, or could not be reached.A wrong token, wrong OAUTH_CLIENT_ID or OAUTH_CLIENT_SECRET, or a network problem.Check the endpoint and the client credentials, see OAuth2 auth.
Token Expired, type expired_keyA JWT is past its exp time.A long running job reused an old token.Fetch a new token, see JWT auth.
Unauthorized access to metrics endpoint: ...GET /metrics needs a key by default.The scraper sends none.Give it a key, or set require_auth_for_metrics_endpoint: false on a private network, see Prometheus.
auth_error, Authentication Error, Only proxy admin can be used to generate, delete, update info for new keys/users/teams. Route=<route>. ...The route is for proxy admins only, for example the guardrail policy and attachment routes.A team admin or internal user key called it.Use a proxy admin key.
A personal Spanway admin bearer credential is required.The admin MCP server got no bearer credential. The WWW-Authenticate header points the client at the sign-in metadata.The client sent no key and has not signed in.Send a virtual key, or let the client sign in with OAuth.

403 Forbidden​

Type or messageMeaningCausesFix
auth_error, key_model_access_denied, team_model_access_denied, user_model_access_denied, org_model_access_denied, project_model_access_denied, agent_model_access_deniedThe caller is authenticated but may not use this model.The key, team, user, organization, project or agent has a models list without it.Add the model to that list, or use an allowed model. The client always gets the same message, The requested model '<model>' is not available for this API key, or the model name is invalid. Check the models available to you and try again., so it does not reveal which models exist. A customer limit is the one exception, it answers customer_model_access_denied with its own message, see the customer row below. The type says which list refused it, and the gateway log line has the full reason.
Only proxy admins may inspect as another keyA POST /v1/inspect body named inspect_as_key and the caller is not a proxy admin.A team admin, internal user, admin viewer or plain key set the field.Leave the field out to dry run as your own key, or ask a proxy admin, see request inspector.
Only proxy admins can replay stored trafficPOST /policies/simulate is for proxy admins, because a replay reads other users' stored prompts.Another role called it.Use a proxy admin key, see policy replay.
Only proxy admins can change attachment modesPUT /policies/attachments/{id}/mode is for proxy admins.Another role tried to switch an attachment between audit and enforce.Use a proxy admin key, see audit mode.
Your Spanway license does not include the 'key_hygiene' feature. ...The key hygiene routes, or an organization max_key_lifetime_days, need a license granting key_hygiene.A license without that feature.Ask sales@spanway.ai for the feature, or leave the field out, see key hygiene.
Admin-only endpoint. Not allowed to access this.The route is for proxy admins, or proxy admins and admin viewers.A team admin, internal user or viewer called it.Use an admin account.
<product> needs a Spanway enterprise license. ..., The '<feature>' feature needs a Spanway enterprise license. ... or Your Spanway license does not include the '<feature>' feature. Contact sales@spanway.ai to add it.The route or feature is licensed and the gateway has no license for it.No SPANWAY_LICENSE, or a license without that feature.Add a license that includes it, see enterprise.
team_member_permission_errorA team member tried a team action their role does not allow.Creating a key or changing a team as a team user instead of a team admin.Ask a team admin, or widen the team's member permissions.
You do not have access to this teamThe caller is neither a proxy admin nor an admin of this team.Calling a team route for another team.Use the right account.
Not allowed to view run ledgersThe key has no user, so it cannot be scoped to rows it may read.A service key without user_id.Give the key a user, or use an admin key.
Only proxy admins can trigger the New Relic test event.GET /health/services?service=newrelic is admin only.A non-admin test.Use a proxy admin key.
model_cost_map_missingThe gateway refuses models it has no price for, and this model has none.A new or custom model without input_cost_per_token and output_cost_per_token.Add a price to the model in Models + Endpoints, see custom pricing.
tool_access_denied, Tool(s) [...] are not in the allowed tools list for this key/team.The request asked for a tool that the key or team does not allow.The key or team has an allowed tools list without that tool.Add the tool to the list, or remove it from the request, see tool policies.
key_search_tool_access_denied, team_search_tool_access_denied, user_search_tool_access_deniedThe caller may not use that search tool. The type names the first layer that lacks the grant, checked key, then team, then user.Search tool deny by default is on and the key, its team or the user has no grant for it.Under deny by default a virtual key needs the tool on the key and on its team, see search access control.
{"kind": "forbidden_origin"}The website assistant only answers pages on allowed websites.The chat request had no Origin header, or one that is not in public_assistant_origins. A search request from a browser on a website not in the list gets it too, while a search with no Origin header is allowed.Call it from an allowed website, or add the origin to public_assistant_origins, see website assistant errors.
This Spanway identity may not use the admin connector.The person behind the key or sign-in may not use the admin MCP server.The role is below SPANWAY_ADMIN_MCP_MIN_ROLE, or the user is blocked, deleted or inactive.Raise the role, or lower SPANWAY_ADMIN_MCP_MIN_ROLE.
Your Spanway license does not include the 'admin_mcp' feature. ...The admin MCP server is licensed and the licence lacks it.A licence without admin_mcp.Ask sales@spanway.ai for the feature.
Only proxy admins can update MCP tool search settings.PATCH /update/mcp_tool_search_settings is for proxy admins.Another role called it.Use a proxy admin key, see tool search errors.
Only proxy admins can set provider_preferences on a key. (or team.)Provider preferences on a key or team bound which providers and prices its holder can reach.A team admin or internal user changed them.Ask a proxy admin, see provider preferences.
Only proxy admins can change global routing presets or Only proxy admins or admins of team '<team>' can change its routing presetsThe caller may not write presets of that scope.A team admin writing a global preset, or a user who is not a team admin.Use a proxy admin key, or write a team preset you administer, see routing presets.
You cannot read routing presets of scope '<team>'The caller is not a member of that team.Reading another team's presets.Read your own team's presets.
Only proxy admins can change organization budget tier policies, Only proxy admins or admins of team '<team>' can change its budget tier policy or Read-only roles cannot change budget tier policiesThe caller may not write that budget tier policy.A team admin writing an organization policy, a member writing a team policy, or a viewer role.Ask a proxy admin or the team's admin.
You cannot read the budget tier policy of <team or organization> '<id>' or Only proxy admins and admin viewers can list every budget tier policyThe caller may not read that policy, or list all of them.Reading another team's or organization's policy.Read your own team's policy, or ask a proxy admin.
Only proxy admins can update configPOST /config/update, which the Router Settings page saves with, is for proxy admins.Another role saved router or gateway settings.Use a proxy admin key.
Only admin users can update config overrides, ... view config overrides, ... delete config overrides, ... test Vault connection or ... test CyberArk connectionA secret manager connection route needs a proxy admin, or an admin viewer for reads.Another role called it.Use a proxy admin key.
user not allowed to access this route, role= proxy_admin_viewer. Trying to access: <route>An admin viewer tried to change something. Admin viewers can only read.A write call, such as creating a policy attachment, with an admin viewer key.Use a proxy admin key.
Access forbidden: IP address <ip> not allowed.The caller's address is not in the gateway allowed_ips list.A new office or VPN address, or a load balancer address when trusted_proxy_ranges is unset.Add the address, or set trusted_proxy_ranges, see allow lists.
Access forbidden: IP address <ip> is not in this key's allowed_ips. (or team's, organization's)A key, team or organization IP list refused the caller.The request came from an address outside that scope's list.Add the range on the key, team or organization, see allow lists.
Access forbidden: <scope>'s allowed_ips setting is invalid. Ask an admin to fix it.A stored IP list cannot be read, so the gateway refuses every request in that scope.A malformed entry saved directly in the database.Save a valid list on the key, team or organization.
Access forbidden: Route <route> not allowedThe route is not in the gateway general_settings.allowed_routes.The list leaves the route out. It applies to every caller, the master key included.Add the path, a wildcard or a route group, see allow lists.
Virtual key is not allowed to call this route. Only allowed to call routes: <routes>. Tried to call route: <route>The key's own allowed_routes leaves the route out.A key made for one job calling another route.Use a key that allows the route, or edit the key, see allow lists.
Only proxy admins can manage the IP allowlist.Only a proxy admin may add, remove or turn off the gateway IP allowlist.A key of any role other than proxy admin, such as an internal user, team admin or admin viewer key, called /add/allowed_ip, /delete/allowed_ip or /disable/allowed_ips.Use a proxy admin key.
Customer=<id> is blocked. An admin can lift it with /customer/unblock., type customer_blockedThe customer named in the user field is blocked.An admin blocked the customer.Unblock it with /customer/unblock, see customers.
The requested model '<model>' is not in the allowed models for this customer. ..., type customer_model_access_deniedThe customer's models list leaves the model out.The customer was limited to some models.Add the model to the customer, see customers.
Admin-only endpoint. Your user role=<role>/customer/list and the customer daily activity routes are for proxy admins and admin viewers.Another role called them.Use an admin key.
OAuth2 proxy auth is only available for premium users. ... or Oauth2 token validation is only available for premium users. ...OAuth2 introspection and OAuth2 proxy auth need Spanway Enterprise.The gateway has no license.Add a license or turn the setting off, see OAuth2 auth.
Single sign-on is not included in this organization's Cloud plan or Your Spanway license does not include the 'organization_sso' feature. ...Organization SSO is not licensed for this organization.A plan or license without organization_sso.Upgrade the plan or license, see organization SSO.
User is not in the restricted SSO group: <group>.ui_access_mode is restricted_sso_group and the person's groups do not include it.The person is not in the group at the identity provider.Add them to the group, see Admin UI SSO.
You must be a Spanway Enterprise user to use SSO for more than 5 users. ... on SSO sign-inThe gateway holds more than 5 active users and has no license, so every SSO sign-in is refused, existing users included.A sixth user was added.Add a license, or deactivate users, see Admin UI SSO.

404 Not Found​

Type or messageMeaningCausesFix
not_found_errorThe object named in the path does not exist.A key, team, user, model or other id that was deleted or mistyped.Check the id in the Admin UI.
No run found for id '<id>'Nothing was recorded for that run, request, trace or session id.The id is wrong, or the rows were deleted by retention.Check the id in the Logs page trace sidebar.
No key with id '<id>'inspect_as_key on POST /v1/inspect names no key.A typo, a deleted key, or a key alias sent instead of the key id.Copy the Key ID from the Virtual Keys page, see request inspector.
Audit log with id=<id> not foundNo audit row has that id.A wrong id, or retention removed it.Copy the id from GET /audit.
Policy or policy version not foundPOST /policies/simulate named a policy or a version that does not exist.No production policy has that policy_name, or no stored version has that policy_id.Check the name or version on the Policies tab, or send guardrails, see policy replay.
Policy '<name>' not found. Create the policy first.A policy attachment names a policy that does not exist.A typo, or the policy was deleted.Create the policy first, see guardrail policies.
No routing preset '@preset/<name>'The preset does not exist for this team.A typo, or the preset belongs to another team.Check the Routing Presets page, see routing presets.
No routing preset '<name>' in scope '<scope>' or Routing preset '<name>' in scope '<scope>' has no version <n>A preset read, delete or rollback names a preset or version that does not exist.A typo, the wrong scope, or a deleted preset.Check the name, scope and Versions, see routing presets.
No budget tier policy is assigned to this key's team or organization or No budget tier policy is assigned to <team or organization> '<id>'A request sent model @tier, or a read or removal named a scope, with no budget tier policy.No policy for the key's team or organization, or it was removed.Assign a policy, or send a normal model name.
No team '<id>' exists or No organization '<id>' existsA budget tier policy names a team or organization that does not exist.A typo, or it was deleted.Copy the id from the Teams or Organizations page.
'<family>-latest' asks for the newest '<family>' model, and no model in that family is served by this gateway.A model family alias found no deployed member.No member is deployed, or only behind a wildcard.Deploy a member, or add a model group alias.
No shadow eval job <id>No shadow eval has that id.A typo. Jobs are never deleted.Copy the id from GET /auto_router/shadow_eval.
Leaked key reporting is not enabledcompromised_key_reports is false.The route was turned off.Turn it on, see leaked keys.
The website assistant is not enabledpublic_assistant is false, so both /public/assistant routes are off.The assistant is off by default.Turn it on, see website assistant.
Not Found on /metricsThe prometheus callback is not configured.It is missing from spanway_settings.callbacks.Add it and restart.
Not Found on /, /redoc, /openapi.json or /routesThe API description is shown only to signed-in users.No key, a wrong key, a service or customer key, or an Admin UI session from another site.Send your own key or sign in to the Admin UI in the same browser, see API docs and build details.

409 Conflict​

Type or messageMeaningCausesFix
{"kind": "ended"}The website assistant chat is over.The chat reached 20 turns.Start a new chat without state, see website assistant errors.
A global preset is named '<name>', so a team preset cannot shadow it or Team presets already use the name '<name>', so a global preset cannot take itA routing preset name is taken in the other scope.Reusing a name across global and team scopes.Pick another name, see routing presets.
Already in an active <direction> shadow eval job: ... Stop it first. or A requested target was claimed by another <direction> shadow eval job concurrently. Stop it first.A target can hold one running shadow eval per direction.A second start for the same target.Stop the running job, or use the other direction.

408 Request Timeout​

Type or messageMeaningCausesFix
TimeoutThe provider did not answer within the request timeout.A slow model, a long prompt, a provider incident.Raise request_timeout, or add a fallback, see reliability.

413 Payload Too Large​

Type or messageMeaningCausesFix
invalid_request_error, Uploaded file exceeds the configured max_file_size_mb of <n> MB ...An upload to /v1/files or to a container is over general_settings.max_file_size_mb. Nothing was sent to the provider.A large file, or a low limit.Split the file or raise the limit.
invalid_request_error, Batch input file is <n> MB, which exceeds the configured max_batch_file_size_mb of <m> MB. ...A batch input file is over max_batch_file_size_mb, see batches.A large batch.Split the batch into several files.
invalid_request_error, Batch input file has more than <n> records, which exceeds the max_batch_file_records of <n> set <source>. ...A batch input file has more lines than the key, team or gateway allows.A large batch.Split the file, or raise the limit on the key, team or gateway.
OCR file exceeds the size limit of 50 MBAn OCR upload is over 50 MB.A large document.Split the document.
Request size is too large. Max size is <n> MB, as {"error": "..."}The request body is over max_request_size_mb (100 MB by default). The gateway refuses it before it reads the key.A large upload or a very long prompt.Make the request smaller, or raise max_request_size_mb, see the settings reference.

422 Unprocessable Entity​

Type or messageMeaningCausesFix
budget_exceeded, Budget has been exceeded! Key=<key alias> Current cost: <spend>, Max budget: <max>The key, team, user, end user, organization, project or model access group spent its max_budget.Normal use reached the budget, or the budget is too low.Raise the budget or wait for its reset. spanway_settings.budget_exceeded_status_code: 429 returns 429 instead. For a key or team budget the body's request_increase hint tells you how to ask for more.
validation_error, or a detail listThe body does not match the route's schema.A missing required field, a wrong type, an unknown enum value such as an email event name.Fix the field named in loc.
an image must be an https URL or a base64 data:image/png, jpeg, gif or webp URL or audio must be a base64 data:audio/wav URLAn eval item's message carries an image or recording the gateway does not accept.A file path, an http link, another file type, or audio that is not WAV.Use an https or data URL, see image and voice scorers.
StructuredOutputRepairError, naming the model, the attempts and the last validation errorWith structured output repair on, the reply still did not match the requested JSON after every allowed retry.A hard schema, a weak model, or structured_output_max_retries too low.Simplify the schema, raise the retries, or use a stronger model.
A detail entry for mcp_tool_search_top_k, mcp_tool_search_similarity_threshold, top_k or similarity_thresholdA tool search value is out of range on a key, team or the global settings.top_k outside 1 to 100, or a threshold outside 0.0 to 1.0.Send a value in range, or leave the override empty, see tool search.
"<service>" not in proxy config: general_settings. Unable to test this.GET /health/services was asked to test a destination that is not configured.slack or ms_teams is not in alerting.Add it, see alerting.
Value error, set exactly one of policy_name, policy_id or guardrails or Value error, set exactly one of team_id or key_hashA POST /policies/simulate body names no policy or more than one, or no traffic scope or both. The text is the msg of the detail entry.Sending policy_name and policy_id together, or team_id and key_hash together.Send one policy field and one scope field, see policy replay.
Value error, the default tier '<tier>' has no routing preset, Value error, the shift at <n>% must move to a tier cheaper than '<tier>', Value error, shifts must be listed with rising at_percent values or Value error, the shift at <n>% moves to '<tier>', which has no routing presetA PUT /routing/tier_policies/... body describes a budget tier policy the gateway cannot follow. The text is the msg of the detail entry.The starting tier or a shift's tier has no preset, a shift does not move to a cheaper tier, or the shift percentages do not rise.Fill the tier's preset, order the shifts from expensive to cheap, or raise the second percentage.
String should have at least 20 characters on keyA POST /public/compromised_key report carries something too short to be a key.A truncated key, or a placeholder.Send the full key as found, see leaked keys.
Provider UnprocessableEntityErrorThe provider could not process the request.Provider specific.Read the provider message kept in the error text.

429 Too Many Requests​

Type or messageMeaningCausesFix
rate_limit_error, Rate limit exceeded for <scope>: <id>. Limit type: <type>. Current limit: <n>, Remaining: 0. Limit resets at: <time>The key, user, team, team member, end user, organization, model or MCP scope named in the message hit its rpm_limit, tpm_limit or max_parallel_requests. The x-spanway-rate-limited-by header names the scope and rate_limit_type the kind.Traffic above the limit.Retry after Retry-After seconds, or raise the limit of that scope, see rate limits. For a key or team limit the body's request_increase hint tells you how to ask for more.
Team borrow cap reached for <model>. ...The team used its team_borrow_cap share of the model.One team using more than its share of a busy model.Lower the team's load, or raise team_borrow_cap.
Team share of the <priority> priority pool used up for <model>. ...With active_team_split on, the team used its even part of its priority class while the model is busy.Several teams in one priority class during saturation.Retry later, add capacity, or turn active_team_split off.
Model capacity reached for <model>. Priority: <priority>, ...The model's whole TPM or RPM is used.Every caller together reached the model's capacity.Add deployments or capacity to the model.
Priority-based rate limit exceeded. Model: <model>, Priority: <priority>, ...The model is busier than saturation_threshold, and the caller's priority class used its reserved share.Saturation with priority_reservation set.Retry later, give the key a higher priority, or add capacity.
Rate limit exceededThe dynamic limiter refused a request for a reason it could not name.A limiter descriptor without a known scope.Report it with the ERROR log line Dynamic rate limiter: OVER_LIMIT response with unknown descriptor_key(s).
Crossed TPM / RPM / Max Parallel Request LimitOnly in legacy limiter mode, LEGACY_MULTI_INSTANCE_RATE_LIMITING=true: the key, team, user or end user hit a limit. This 429 carries only Retry-After and x-spanway-rate-limited-by.Traffic above the limit.Raise the limit on the key or team, or spread the traffic.
No healthy deployment available or No deployments availableEvery deployment for the model is cooled down or has no capacity.A provider outage, exhausted provider budgets, or limits on every deployment.Add deployments or fallbacks, and check health.
No deployments available - crossed budget: ...Every deployment of the group belongs to a provider or deployment over its budget.Spend reached budget_limit in the current window.Add a deployment on another provider, raise the budget, or wait for the window to reset.
Provider throttling_error, spanway.RateLimitError: ...The provider itself rate limited the call. The gateway's own limits answer rate_limit_error instead, so the type tells you who refused.Provider quota.Add more deployments and let the router retry and fall back.
Too many requests to public pages from this address, try again in <n> secondsOne address sent more requests to the public feeds this minute than public_route_rate_limit_per_minute allows.A script copying the public pages, or many visitors behind one address.Wait for Retry-After, raise the limit, or set trusted_proxy_ranges behind a load balancer, see public feed rate limit.
Too many leaked key reports from this addressPOST /public/compromised_key got more reports than allowed from one address.A scanner sending too fast.Wait for Retry-After, or raise compromised_key_reports_per_minute.
Inspect rate limit reached: <n> dry runs per minute for this keyPOST /v1/inspect used up the key's dry run allowance for this minute.More than INSPECT_RPM_LIMIT (60 by default) dry runs in a minute, or more than the key's rpm_limit when that is lower. A dry run as another key counts against the admin who sent it.Wait for the time in the Retry-After header, or raise INSPECT_RPM_LIMIT, see request inspector.
{"kind": "rate_limited", "retry_after": <seconds>}The website assistant is pausing this visitor.The visitor address used its chat or search allowance, the gateway reached public_assistant_daily_turn_ceiling, or the address is in its 15 minute pause. On AWS the web firewall answers the same body with retry_after 300 when one address sends more than 60 assistant requests in 5 minutes.Wait for Retry-After. Raise the daily ceiling if real traffic needs it, see website assistant errors.

500 Internal Server Error​

Type or messageMeaningCausesFix
internal_server_errorSomething failed inside the gateway. The answer never carries the stack trace, which stays in the gateway log.A bug, a failed dependency, a misconfiguration the gateway could not detect earlier.Find the request by x-spanway-call-id in the gateway log and read the traceback.
The gateway hit a database error and could not finish the request. The gateway log has the cause.A management route, such as POST /user/new, failed on an unexpected database error. The answer never carries the database host, driver text or file paths, so callers cannot learn how the deployment is built. Other unexpected errors keep their message with internal hosts, paths and secrets replaced by REDACTED.The database went away mid-request, or it rejected the write.Find the request by x-spanway-call-id in the gateway log, which keeps the full database error, then check the database.
DB not connected. This endpoint needs a database; set DATABASE_URL ...A management route needs the database and there is none.DATABASE_URL is unset.Set it.
Database not connected. Set DATABASE_URL to manage email event settingsThe same, for /email routes.The same.The same.
No db connectedThe same, for team callback routes.The same.The same.
Set `'STORE_MODEL_IN_DB='True'` in your env to enable this feature.A settings route that saves to the database, such as PATCH /update/mcp_tool_search_settings, was called while settings are not stored in the database.store_model_in_db is off.Set store_model_in_db: true in general_settings, or edit the setting in the config file and restart.
Database not connected. Please connect a database.A settings read needs the database.DATABASE_URL is unset.Set it.
no models are configured on the proxyA red team run was started on a gateway with no models.An empty model_list and no models in the database.Add the target, simulator and evaluation models first.
MS Teams webhook returned status <code>: <text>The Teams test post was rejected.A revoked or mistyped webhook.Create the webhook again.
Routing presets need a connected databaseA request or a dry run names a routing preset and the gateway has no database to read presets from.DATABASE_URL is unset.Set it, or send the request without a preset, see request inspector.
Budget tier policies need a connected databaseA request sent model @tier and the gateway has no database to read budget tier policies from.DATABASE_URL is unset.Set it, or send a normal model name.
Inspecting as another key needs a connected databasePOST /v1/inspect with inspect_as_key cannot look the key up.DATABASE_URL is unset.Set it, see request inspector.
No database connected on /routing/presets or /routing/tier_policiesManaging routing presets and budget tier policies needs the database.DATABASE_URL is unset.Set it.
Failed to initialize secret manager: ..., Failed to persist Hashicorp Vault configuration: ... or Failed to persist CyberArk configuration: ...A secret manager connection save failed. Nothing was stored and the previous connection is back in force.The store refused the login, or the database write failed.Check the credentials, the network path and the database, then save again.
Database not connectedA policy or attachment route, such as POST /policies/attachments, needs the database.DATABASE_URL is unset.Set it, or define the attachment in config.yaml.
Provider InternalServerError, APIErrorThe provider failed.Provider incident.Fall back to another deployment, see reliability.
spanway.APIConnectionError: ...The gateway could not reach the provider.Network, DNS or TLS failure, or a wrong api_base.Check the deployment's api_base and the gateway's egress.
spanway.JSONSchemaValidationError: model=<model>, returned an invalid response=<response>, for schema=<schema>.The answer did not match the JSON schema the request asked for, and structured output repair is off.A hard schema or a model that does not follow it.Turn on structured output repair, which answers 422 StructuredOutputRepairError when it gives up.

502 and 503​

Status and typeMeaningCausesFix
502 BadGatewayErrorThe provider returned something that is not a valid response.A provider proxy or load balancer error.Retry, or fall back.
502 Headroom compression service unreachable and the other Headroom compression service ... messagesThe Headroom compression guardrail could not compress the prompt and its unreachable_fallback is fail_closed, so the request was refused before it reached the model.Headroom is down, slow, misconfigured or answered in a shape the gateway cannot use.See Headroom errors, or set unreachable_fallback: fail_open so requests go through uncompressed.
503 Rate limit enforcement unavailable: request counters could not be verified against Redis, ...The gateway could not read its rate limit counters, and fail_closed_rate_limit_enforcement is on (the default), so it refused the request rather than risk going over a limit.Redis is down or unreachable.Restore Redis, or set fail_closed_rate_limit_enforcement: false to count on each instance while Redis is out, see rate limits.
503 cloud_billing_unavailable, Spanway Cloud cannot price usage for organization <id> right now, so the request was refused and nothing was charged. ...Spanway Cloud refused a tenant's request because its billing settings are broken, so the request could not be charged. Nothing was charged.The operator's general_settings.cloud block does not validate, for example a usage_price_per_usd outside 1 to 3.Tenants retry later or contact support@spanway.ai. Operators read config_error on GET /cloud/billing/status and fix that key, see Cloud billing safety.
503 ServiceUnavailableErrorThe provider is overloaded or down.Provider incident.Retry with backoff, or fall back.
503 MidStreamFallbackErrorA stream failed after it started and the fallback could not finish it. When the provider's own error carried a status, that status is used instead of 503.A provider dropped the stream, and no fallback was configured or it failed too.Add a fallback deployment, see reliability.
503 a database messageThe database is unavailable and allow_requests_on_db_unavailable is off.A database outage.Restore the database, or turn that setting on for a degraded mode.
503 No database connectedPOST /public/compromised_key has no database to look keys up in.DATABASE_URL is unset.Set it.
503 OAuth sign-in to the admin connector needs UI login, ...The admin MCP server cannot accept OAuth sessions.EXPERIMENTAL_UI_LOGIN=false.Turn UI login back on, or connect with a virtual key, see admin MCP errors.
503 The gateway cannot read the allowed_ips of your teams and organizations or The gateway cannot verify session tokensThe admin MCP server could not check an OAuth session.The database is unavailable, or no master key is set.Check the database and the master key.
503 auth_provider_unavailableThe identity provider needed to check a JWT could not be reached.The JWKS endpoint is down, blocked by egress rules, or its URL is wrong.Check JWT_PUBLIC_KEY_URL and that the gateway can reach it, see JWT auth.
503 cache_ping_errorGET /cache/ping could not reach the cache.Redis is down, or its host, port or password is wrong.Fix the cache settings, see cache connection test.
503 Cache not initialized. spanway.cache is None or Service Unhealthy (...) from /cache/delete, /cache/flushall or /cache/redis/infoThe gateway has no response cache, or Redis did not answer.No cache is configured, or Redis is down.Configure the cache, then check it on the Cache Health tab, see Response Cache page errors.
503 {"kind": "not_ready"}The website assistant has no docs index loaded yet.The index was never built, or public_assistant_index_bucket points at the wrong place.Build and publish the index, then check the log for public_assistant index swapped to version, see website assistant errors.
503 {"kind": "unavailable"}The website assistant could not answer.The model call failed after fallback, the assistant key's budget is used up, the turn took over 30 seconds, Redis is unreachable, SPANWAY_ASSISTANT_KEY or SPANWAY_SALT_KEY is unset, or trusted_proxy_ranges is unset.Check the key budget, provider keys, Redis, the two environment variables and trusted_proxy_ranges, see website assistant errors and the log reference.

499 Client Closed Request​

Type or messageMeaningCausesFix
Client disconnected the requestThe client hung up before the answer was ready. Nobody receives this answer, but the request shows on the Logs page with status 499. With cancel_on_disconnect on, the provider call is cancelled too.A client timeout shorter than the model's answer time, a closed browser tab, or a stopped script.Raise the client timeout, or stream the answer so the first tokens arrive sooner.

Feature errors​

The errors below come from one feature each. Every body has the shape {"detail": {"error": "<message>"}}, and the feature page explains each one in more detail.

Access requests​

Status and messageMeaningCausesFix
400 access requests need a key bound to a userAccess requests belong to a person.The caller used a key with no user, such as a service key.Call with your own key or Admin UI session.
400 model_access targets exactly one of key or team_idThe request is ambiguous.The payload names both key and team_id, or neither.Send exactly one.
400 rate_limit_increase targets exactly one of key or team_idA rate limit request must name one key or one team.The payload names both key and team_id, or neither.Send exactly one.
403 the key is not one the requester ownsThe request named someone else's key.A wrong token id or alias.Pick one of your own keys.
403 team_id=<id> is not open to join, ask a team admin to add youJoin requests are only for open teams.The team is not in default_internal_user_params.available_teams.Ask a team admin to add you.
400 could not apply request: <reason>Approving would break a limit, so nothing changed and the request is pending again. The status can also be 403 or 404, matching the refusal.A budget above the team's, or a reviewer who may not change that key.Fix the limit, or reject the request.
409 request_id=<id> is already being reviewedTwo approvals raced.Another approver is applying the same request.Reload the queue.
400 rpm_limit=<n> does not raise the key's current rpm_limit=<m>A rate limit request must ask for more than today. The same message names tpm_limit or the team.The number asked for is not higher than the current limit.Ask for a higher number.
400 the key has no rpm_limit, so there is no limit to raiseThat limit is not set, so it is already unlimited.The request names a limit the key or team does not have.Leave that limit out.
403 only an admin of team_id=<id> can request its rate limits be raisedTeam limits are a team admin's call.A team member asked for higher team limits.Ask a team admin to file the request.
422 rate_limit_increase needs rpm_limit, tpm_limit or bothA rate limit request has to say which limit to raise.The payload has neither rpm_limit nor tpm_limit.Send rpm_limit, tpm_limit or both.
422 expires_after must be longer than zero and at most 366dA temporary raise needs a length the gateway can read.A value like 0d, 400d or next week.Send a length such as 12h, 7d or 1mo, or leave it out.

A budget or rate limit refusal of a key or a team, such as budget_exceeded or a 429 from rpm_limit or tpm_limit, carries a request_increase object inside error when the license includes access requests. It names the request type, the limit to raise and the route to file it, see ask from an error.

See access requests for every message.

Logging destinations and alerting​

Status and messageMeaningCausesFix
422 Callback param '<name>' (from key/team callback metadata) contains an 'os.environ/' reference. ...A team or key logging credential names an environment variable.Team and key callbacks may not read the gateway's environment.Type the real value, or set the callback gateway wide in the config file.
400 callback_name = <name> already exists in team_callback_settings, for team_id = <id> and event = <type>The team already has that callback for that event.A repeated add.Remove it first, or pick another event type.
404 callback_name = <name> is not registered for team_id = <id>.The team has no callback of that name.A wrong name.List them with GET /team/{team_id}/callback.
404 Callback '<name>' not found in active configurationOnly success callbacks can be deleted from the Admin UI.The callback lives under callbacks or failure_callback in the config file.Remove it from the config file.
403 Only proxy admins can trigger the <service> test alert.Alert tests post to real channels.A key that is not a proxy admin.Use a proxy admin key.
422 "<service>" not in proxy config: general_settings. Unable to test this.The alert destination is not turned on.general_settings.alerting lacks it.Add it to alerting.

See logging, team logging, alerting and email for every message.

Data subject requests​

Status and messageMeaningCausesFix
400 a caller cannot erase itselfAn admin tried to erase their own account.The subject id is the caller's user id.Use another admin account.
400 user_id=<id> is a proxy admin, demote the user before erasing itProxy admins are never erased.The subject is a proxy admin.Change the role first.
403 On Spanway Cloud only a caller in an organization can act on its end usersA Cloud caller without an organization asked about an end user. The request is recorded as failed.A key with no organization.Use a key of the tenant's organization.
404 end_user <id> not found or user <id> not foundExport found nothing for that id, recorded as a failed request.A wrong id.Enter the id as the Customers or Internal Users page lists it.
404 end user user_id=<id> not found or user_id=<id> not foundErase found nothing for that id.A wrong id.Check the id.
409 user_id=<id> owns Cloud tenant <tenant_id>, which is still open. Close the workspace before erasing its ownerThe person owns an open Cloud workspace.The workspace is active or suspended.Close the workspace, then erase.
500 erasure needs SPANWAY_SALT_KEY or a master key to derive pseudonymsNo key to make pseudonyms.Neither key is set.Set SPANWAY_SALT_KEY.

See compliance for every message.

Organizations​

Status and messageMeaningCausesFix
404 Organization not found for organization_id=<id>The update named an organization that does not exist.A wrong id.Check the id with GET /organization/list.
404 Organization=<id> not foundA delete named an unknown organization, and nothing was deleted.One wrong id in the list.Remove it and retry.
403 Only a proxy admin can change <fields> on an organization...Organization admins may change only the name, require_mfa and metadata.An organization admin sent a budget, model or limit field.Ask a proxy admin.
409 user_id=<id> is already a member of organization_id=<org>The member is already in the organization.A repeated member add.Use member update to change the role.
400 Multiple users with this email found in db...The email matches more than one user.Duplicate accounts.Send user_id.

See organizations for every message.

SCIM​

Status and messageMeaningCausesFix
401 User=<id> has been deactivated via SCIM. Keys owned by this user cannot be used.The directory deactivated the key's owner, so the gateway refuses the key.The person left or was unassigned from the app.Expected. Reactivate them in the directory to unblock their keys.
400 User with ID '<id>' does not exist. Please create the user first via POST /Users before adding to group.A group push named a member who has no account.scim_upsert_user is off, or an organization-scoped token is used.Assign the user to the app first, or turn scim_upsert_user on.
400 Member ID '<id>' names more than one Spanway user...A group member matches several accounts.A leftover placeholder row.Merge or delete the placeholder.
400 invalidFilter: only ... filters are supportedThe list filter is not one the gateway supports.An attribute other than userName or emails.value, or an operator other than eq.Use a supported equality filter.
409 User already exists with username: <userName>The user is already provisioned.The provider created the user twice.Let the provider update the existing user.

See SCIM provisioning for every message.

Key hygiene and master key​

Status and messageMeaningCausesFix
500 general_settings.key_hygiene is invalid: ...The key hygiene policy does not validate.A value out of range, for example unused_days below 1.Fix it on the Policy card or in the config.
500 No database connectedThe report needs the key table.The gateway runs without a database.Set DATABASE_URL.
403 Only proxy admins, admin viewers, org admins and team admins can read the key hygiene reportThe caller is not an admin of any kind.A plain user key.Use an admin session.
400 New master key is required.POST /key/regenerate named the master key without a replacement.new_master_key missing.Send new_master_key, see rotating the master key.

FIPS mode​

These stop the gateway at startup with exit status 1 and only appear while SPANWAY_FIPS_MODE is on. The FIPS 140-3 image page explains each one.

Status and messageMeaningCausesFix
Startup Spanway proxy refused to start: SPANWAY_FIPS_MODE=<value> is not a boolean.The variable is not a true or false value.A typo such as enforced.Set true or false, or unset it.
Startup Spanway proxy refused to start: SPANWAY_FIPS_MODE is on but this Python does not enforce FIPS.FIPS mode was asked for where OpenSSL does not enforce it.The standard spanway-ai image, or a changed OPENSSL_CONF.Run spanway-ai-fips with its default environment.
Startup Spanway proxy refused to start: SPANWAY_FIPS_MODE is on but TLS certificate verification is disabled by <source>.Certificate checks are off.SSL_VERIFY=false or spanway_settings.ssl_verify: false.Remove the override or point ssl_verify at a CA bundle.
401 on POST /v2/loginA password stored as scrypt cannot be checked in FIPS mode.The password was set on the standard image.Set the password again or use SSO. The gateway log names the reason.

AWS Marketplace​

The AWS Marketplace listing is planned, so these only appear when someone turns marketplace mode on early. None of them is an HTTP error. The AWS Marketplace (planned) page explains each one.

Status and messageMeaningCausesFix
Every licensed feature off, license_type starter on GET /health/licenseThe marketplace entitlement could not be verified, so the licence features stay off.No listing exists yet, the IAM role is missing an action, or a usage listing runs with metering off.Leave marketplace.provider empty and use a license key until the listing is live.
Licensed features turn off while the gateway runs, log line AWS Marketplace refused the usage record ...AWS refused an hourly usage record because the account is not entitled.The subscription ended, the product code is wrong or the IAM role lost aws-marketplace:MeterUsage.Renew the subscription or fix the code or role. The features return with the next accepted hourly record.
Helm render marketplace.aws.pricing=usage needs marketplace.aws.metering.enabled=true ...Usage pricing without the switch that sends the usage.The switch is off by default.Turn it on only for a live usage listing, or use another pricing.
Helm render marketplace.aws.metering.enabled needs marketplace.aws.pricing=usage ...The switch was turned on for a listing that is not billed per request.A copied values file.Turn the switch off.
Helm render marketplace.aws.pricing=usage needs gateway.numWorkers=1 ...Several workers in one pod would each send an hourly record.gateway.numWorkers above 1.Set it to 1 and add replicas instead.

Access groups​

Status and messageMeaningCausesFix
409 Access group '<name>' already existsGroup names are unique.Another group has the name.Pick another name or update that group.
404 Access group '<id>' not foundNo group has that id.A deleted group or a typo.List groups with GET /v1/access_group.
400 Unknown team ids: <ids>A group can only be attached to existing teams.A deleted team or a typo in assigned_team_ids.Check the ids with GET /team/list.
500 Failed to delete access group. Please try again.The delete failed and nothing was removed.A database error that was not an outage.Read the gateway log and retry.

See access groups for every message.

Custom roles​

Status and messageMeaningCausesFix
403 user not allowed to access this route. Route=<route> is denied by the user's custom roleThe user's custom role denies the route.A denied permission covers the route, and denials win over grants.Remove the denial, or give the user another role.
403 Only proxy admins can change this resourceOnly proxy admins change custom roles and assignments.A non admin called /role/new, /role/update, /role/delete, /role/assign or /role/unassign.Use a proxy admin key.
400 user_id=<id> is a proxy_admin, and custom roles never restrict proxy adminsThe role would have no effect./role/assign named a proxy admin.Change the user's Global Proxy Role first, or leave the role off.
422 Value error, unknown permissions: <names>. See GET /role/permissionsThe role names a permission that does not exist.A typo, or a permission that was retired.Use names from GET /role/permissions.

See custom roles for every message.

Projects​

Project routes answer in the OpenAI error shape, {"error": {"message": ..., "type": ..., "code": ...}}.

Status and messageMeaningCausesFix
400 Models [...] not in team's allowed models. ...A project may only use models its team may use.The project lists a model the team does not have.Add the model to the team first, or drop it from the project.
400 Project max_budget (<value>) exceeds team's max_budget (<value>). Team: <id>A project cap cannot be above its team's cap. The same applies to tpm_limit, rpm_limit and tpd_limit.The project value is higher than the team's.Lower the project value or raise the team's.
403 You do not have permission to create projects. Only proxy admins, or admins of the project's team once 'projects' is enabled under team_admin_editable_team_fields, can do this.The caller may not change projects on that team.A team admin on a gateway that has not opened projects to team admins, or someone who is not a team admin.Ask a proxy admin, or add projects to team_admin_editable_team_fields.
401 containing Project=<id> is blocked. Update via /project/update if you're an admin.A model request used a key on a blocked project.Someone turned on Block Project.Ask a proxy admin to unblock the project.
422 Budget has been exceeded! Project=<id> Current cost: <spend>, Max budget: <budget>The project spent its budget.Spend reached the project's max_budget.Raise the budget or wait for it to reset.
400 allowed_passthrough_routes only apply to keys and teams, so a project cannot carry them. Set them on the keys or teams instead.A project cannot limit pass-through routes, so the gateway refuses the field instead of storing a limit it would never apply. The message names denied_passthrough_routes too when the body sends it.metadata.allowed_passthrough_routes or metadata.denied_passthrough_routes on /project/new or /project/update. Organization create and update refuse them the same way, naming an organization.Set the lists on the keys or the team instead.

See projects for every message.

Teams​

Status and messageMeaningCausesFix
404 Team not found, passed team_id=<id>No team has that id. Every team route answers an unknown team this way.A typo or a deleted team.Check the id with GET /team/list.
403 Removing team members is turned off for team admins on this proxy (disable_team_admin_delete_team_user). Ask a proxy admin to remove the member.Team admins may not remove members on this gateway.disable_team_admin_delete_team_user is on, usually because SCIM owns team membership.Ask a proxy admin, or remove the member in your identity provider.
403 Team admins on this proxy do not have permission to update '<field>'. ...A team admin sent a field proxy admins have not opened to team admins.The field is not in team_admin_editable_team_fields.Ask a proxy admin to add it.
401 containing Team=<id> is blocked. Update via /team/unblock if you're an admin.A model request used a key of a blocked team.A proxy admin blocked the team.Ask a proxy admin to unblock it.

See teams for every message.

Internal users​

Status and messageMeaningCausesFix
409 User with email <email> already exists or User with id <id> already existsUser ids and emails are unique.The person already has an account.Update the existing user instead.
403 License is over limit. Please contact https://spanway.ai/support to upgrade your license.The license allows no more users.The gateway reached the user count its license covers.Remove unused users or extend the license.
403 User does not have permission to update this user. Only PROXY_ADMIN can update other users.Only proxy admins edit other users.An organization admin or internal user tried to edit someone else.Ask a proxy admin.
422 ExceededBudget: User=<id> over budget. Spend=<spend>, Budget=<budget>The user spent their personal budget.Spend on keys that belong to no team reached the user's max_budget.Raise the user's budget or wait for it to reset.

See users for every message.

Virtual keys​

Status and messageMeaningCausesFix
400 Key with alias '<alias>' already exists. Unique key aliases across all keys are required.Key aliases are unique across the whole gateway.Another key, in any team, already uses the alias.Pick another alias.
400 Invalid duration format: <value>. Use a number followed by s, m, h, d, w or mo, for example 30dThe duration or rotation_interval cannot be read.A value like 90 days.Send 90d.
403 Custom API key values are disabled by your administrator. Keys must be auto-generated.The gateway generates every key value.disable_custom_api_keys is on and the request sent key.Leave key out.
403 Only proxy admins can enable throttle_on_budget_exceeded on a key.Throttling over-budget keys is an admin decision.A non admin sent throttle_on_budget_exceeded: true.Ask a proxy admin.
403 Only proxy admins can bind a key to an agent or change the agent of a key (`agent_id`).A key bound to an agent acts as that agent and uses its stored credentials, so only an admin may bind one.A non admin sent an agent_id on /key/generate, /key/service-account/generate or /key/regenerate, or changed it on /key/update or /key/bulk_update.Ask a proxy admin to create the agent's key, see agent credentials.
400 metadata.workload_identity is reserved for keys issued by workload identity federation ... or User ids that start with workload_identity: are reserved ...The cleanup job deletes expired keys that carry these markers, so people cannot set them.A workload_identity entry in key metadata, or a caller whose user id starts with workload_identity:.Remove the entry, or create the key as another user.
403 Only proxy admins can set default_estimated_output_tokens or default_estimated_output_tokens_per_model on a key. (or team)The answer length the rate limiter sets aside is an admin decision.A key holder or team admin changed the value.Ask a proxy admin, see rate limits.
401 containing Key is blocked. Update via /key/unblock if you're an admin.The key is blocked.An admin blocked it, for example after a leak.Ask an admin to unblock it, or use another key.

See virtual keys for every message.

Customers​

Customers are the end users your application names in the user field. The model access and blocked customer answers are in the 403 table.

Status and messageMeaningCausesFix
400 User blocked from making LLM API Calls. User=<id>The id is on the config file's block list.The id is in spanway_settings.blocked_user_list and the blocked_user_check callback is on.Remove the id from that list and reload the config. /customer/unblock cannot lift this block.
400 Customer already exists, passed user_id=<id>. Please pass a new user_id./customer/new named an id that already has a customer.A repeated create.Change it with /customer/update instead.
404 End User Id=<id> does not exist in db/customer/info or /customer/update named an unknown customer.A typo, a deleted customer, or a Spanway Cloud id sent without its organization prefix.Check the id with GET /customer/list.
422 Default model <model> is not on this gateway. Add it with /model/new or config.yaml first.default_model names a model the gateway does not serve.A typo, or a model that was removed.Add the model first, or leave the field out.
500 Could not create the customer. The gateway log has the cause., Could not update the customer. ..., Could not delete the customers. ..., Could not block the customers. ..., Could not create the customer's budget. ... or Could not save the customer's budget. ...A write failed and nothing changed.Usually the database.Read the matching line under customer lines, then retry.

See customers for every message.

Workload identity​

POST /v1/workload-identity/token answers in the OAuth error shape, {"error": "<code>", "error_description": "<text>"}, so token exchange clients can read it.

Status and messageMeaningCausesFix
400 invalid_grant, the subject token is not trusted by any workload identity policyNo trust policy accepts the token.No policy names the token's iss, or its subject or claims match no policy.Compare the token's iss, sub and claims with the policies.
400 invalid_grant, the subject token failed validation: <reasons>A policy trusts the issuer, but the token failed a check.A wrong aud, an expired token, a missing exp, iat or sub, an unsigned token or an unknown signing key.Request the token with the gateway's audience and a fresh expiry, and check the policy's jwks_url.
400 invalid_grant, more than one trust policy matches the subject token, name one in scope or trust policy <scope> does not match the subject tokenThe gateway cannot pick one policy.Several policies trust the token, or scope names a policy that does not.Send scope=<policy name> with the right name.
400 unsupported_grant_type or invalid_requestThe form names a grant or token type the gateway does not take.A wrong grant_type, subject_token_type or requested_token_type.Send the token exchange grant with a jwt or id_token subject type.
500 server_error, the gateway could not create the keyThe token was trusted, but the key could not be made.The policy names a team that does not exist, or the gateway has no database.Read the workload identity key for trust policy line in the log reference.

See workload identity for every message.

Headroom compression​

These come back as a 502 with {"detail": {"error": "<message>", ...}} while the guardrail's unreachable_fallback is fail_closed. With fail_open the request goes through uncompressed and only the log shows the problem.

Status and messageMeaningCausesFix
502 Headroom compression service unreachableThe gateway could not connect to Headroom or it did not answer in time.A wrong api_base, a network block, or Headroom slower than timeout (60 seconds by default).Check api_base and the network path, or raise timeout.
502 Headroom compression service returned an errorHeadroom answered with an error status, which detail.status_code names, with the start of its answer in detail.body.401 is a wrong api_key. 404 adds a detail.hint, because self hosted Headroom may need HEADROOM_COMPRESS_ALLOW_REMOTE=1.Fix the key or the Headroom deployment.
502 Headroom compression service returned non-JSON response, ... unexpected response shape, ... response missing 'messages', ... returned empty message list or ... changed the message countHeadroom answered, but not with a usable list of compressed messages.A Headroom version the gateway does not support, or a proxy in front of Headroom returning its own page.Check that api_base points straight at Headroom, then upgrade Headroom.
400 Guardrail configuration error: Headroom guardrail requires an API base URL. ...A Headroom guardrail was created without an address.Neither api_base nor HEADROOM_API_BASE is set.Send api_base, or set the environment variable.

See Headroom for every message.

Guardrails and policies​

Status and messageMeaningCausesFix
400 Guardrail configuration error: <reason>POST /guardrails refused a guardrail that did not start. Nothing was stored.A missing address such as PRESIDIO_ANALYZER_API_BASE, a misspelled integration name, or custom code that does not compile.Fix what the reason names, see guardrails.
403 ... needs a Spanway enterprise license. ...A licensed guardrail such as Hide Secrets, or guardrails set on a team or key, on a gateway without the license.No Enterprise license, or one without the guardrails feature.Add the license, or use Always On or a policy attachment.
400 spanway_params.default_on cannot be set on a team submission, ... or ... cannot reference a gateway environment variable on a team submission. ...A team guardrail submission asked to run everywhere or to read a gateway secret.default_on set to anything that does not read as false (true, "true", 1), or a value starting with os.environ/ anywhere in the settings, including inside lists and nested objects.Remove the field, and send the team's own key as a literal value.
500 Custom code guardrail '<name>' exceeded its <n>s execution timeout or Custom code guardrail execution failed: <error>A custom code guardrail ran too long or raised, so the request failed.Slow or buggy code.Fix the function, or raise its timeout.
500 Generic Guardrail API failed: <error>A generic guardrail API service failed while the guardrail fails closed.The service is down, slow or answered badly.Fix the service, or set unreachable_fallback: fail_open or fail_on_error: false where unchecked traffic is acceptable.
400 Cannot promote draft directly to production. Publish the version first. or Only draft versions can be published. Current status: '<status>'.A policy version status change is not allowed.Promoting a draft, or publishing a version that is not a draft.Publish first, or promote another version.
400 Parent policy '<name>' not foundResolving a policy's guardrails found a broken inherit chain.The parent has no production version, or the chain loops.Fix inherit.

Model Leaderboard​

GET /model-insights and GET /model-insights/tasks answer errors as {"detail": "<message>"}.

Status and messageMeaningCausesFix
400 Dates must use YYYY-MM-DDA date could not be read.A value like 2026-9-1 or a full timestamp.Send 2026-09-01.
400 Date range must be between 1 and 365 daysThe range is reversed or longer than a year.start_date after end_date, or a range over 365 days.Shorten or fix the range.
403 Only proxy admins can view deployment-wide model insightsThe data covers every team.An org admin, internal user or viewer key.Use a proxy admin or admin viewer.
500 DB not connected. This endpoint needs a database; ...The usage rollup lives in the database.DATABASE_URL is unset.Set it.

See Model Leaderboard for every message.

Alerts inbox​

The /alerts routes answer errors as {"detail": {"error": "<message>"}}.

Status and messageMeaningCausesFix
403 Only proxy admins and admin viewers can read alertsAlerts and baselines cover every user and key.An org admin, internal user or team key with no alerts.read grant.Use a proxy admin or admin viewer key, or grant alerts.read.
403 Only proxy admins can change alertsOnly proxy admins scan, acknowledge, assign and resolve.An admin viewer or a key with no alerts.write grant.Use a proxy admin key, or grant alerts.write.
404 alert_id=<id> not foundNo alert has that id.A typo, or a resolved alert deleted after 90 days.List the alerts with GET /alerts/inbox?status=all.
409 alert_id=<id> is not openOnly an open alert can be acknowledged.It was acknowledged or resolved already, maybe by a colleague.Reload the inbox.
409 alert_id=<id> is already resolvedA resolved alert cannot be assigned or resolved again.Someone closed it first.Nothing to do.
422 Value error, text must not contain control charactersThe owner or note holds control characters.Pasted terminal output or an attempt to forge log lines.Send plain text.

See alerts inbox for every message.

Query and Explore​

The /analytics routes answer errors as {"detail": {"code": "<code>", "message": "<message>"}}.

Status and codeMeaningCausesFix
400 query_refusedThe SQL uses something the safety checks do not allow, and nothing ran.A function, table, cast or statement that is not on the allowed list, for example the function pg_read_file is not allowed, unknown table Spanway_UserTable or send exactly one statement.Use only the tables and functions listed in GET /analytics/query/help.
400 query_failedThe database could not run the query, a value cannot be sent as JSON, or the answer is over 10 MB.A misspelt column (column "cost" does not exist), a result column of a type such as interval, or very long values.Fix the name, cast the value to text or a number, or return fewer rows.
400 query_timeoutThe query ran past analytics_query.timeout_seconds.A query over many request rows.Narrow the dates, query a daily table, or raise the limit.
400 invalid_requestAn Explore, Trends, end user or Ask AI request that cannot be answered.Two of user, team, end user and tag in one chart, date as a trend dimension, reversed dates, or an Ask AI model the gateway does not serve.Change the request as the message says.
400 limit_reachedThe person already has 200 saved queries and charts.Many saved items.Delete items no longer needed.
403 forbiddenThe caller may not do this.A key that belongs to no user, a view only role saving, a non admin using Ask AI, or a change to someone else's saved item.Use a session or key of a user with the right role.
403 disabledAnalytics queries are turned off.analytics_query.enabled is false, or the analytics_query block is invalid.Turn it on in the config, or fix the block the log warning names.
404 not_foundNo visible saved item has that id.A typo, a deleted item, or someone else's private item.List the items with GET /analytics/saved.
429 busyThe gateway instance already runs max_concurrent queries.Many people querying at once.Retry after Retry-After seconds, or raise max_concurrent.
503 unavailableThe database or read replica did not answer.A database outage.Check the database and retry.

See Query and Explore for every message.

MCP usage analytics​

The /tag/mcp routes answer errors as {"detail": "<message>"}, except the missing database, which answers {"detail": {"error": "<message>"}}.

Status and messageMeaningCausesFix
400 end_date is before start_date. Send a start_date on or before the end_date.The tools or agents range runs backwards, and nothing ran.Dates swapped in the call.Send a start_date on or before the end_date.
400 The range is longer than 366 days. Pick a shorter range.The tools or agents range is too long, and nothing ran.A multi year range.Ask for a year or less at a time.
500 Failed to read MCP usage analytics. The gateway log has the cause.The rollup query failed in the database.A database outage, or migrations that have not run.Read the MCP usage analytics query failed log line.

See MCP usage analytics for the other answers, such as an empty client split.

Skills over MCP​

The MCP skills methods answer JSON-RPC errors inside an HTTP 200 stream, not HTTP errors. On /mcp they use code -32602, and on /mcp/proxy code -32601.

Code and messageMeaningCausesFix
-32602 Unknown skill: <uri>skills/get found no skill this key may read at that address.A mistyped address, a skill owned by someone else, or a skill the gateway does not serve.Copy the uri from skills/list, see skills over MCP.
-32602 Resource not found: <uri>resources/read asked for a skill:// file outside the skill's listing.A file path that is not in the skill, or a skill the key may not read.Read only the addresses in the skill's resources list.
-32602 Invalid skills/list cursorThe page cursor was not one the gateway issued.A changed or invented cursor.Send back the nextCursor value unchanged.
-32601 Operation unavailable on /mcp/proxyThe skills methods (skills/list, skills/get and resources/read of a skill:// address) were called on /mcp/proxy, which does not serve them.A client pointed at the proxy endpoint instead of the gateway's own MCP endpoint.Call them on /mcp, see skills over MCP.
-32602 This key may not read skills, its allowed_routes do not include <route>The key may not call the skills API, so it cannot read skills over MCP either.The key's allowed_routes leave out /v1/skills or /v1/skills/<skill id>, for example a key limited to mcp_routes.Add anthropic_routes or the skills routes to the key, see skills over MCP.

Budgets​

Status and messageMeaningCausesFix
422 Budget has been exceeded! ... or ExceededBudget: ... over budgetA request was refused because a budget is spent.Spend reached max_budget in the current period.Raise the budget or wait for the reset. Set spanway_settings.budget_exceeded_status_code: 429 if your clients only back off on 429.
404 Budget with id '<id>' not found/budget/update or /budget/delete named a budget that does not exist, and nothing changed.A typo or an already deleted budget.List budgets with GET /budget/list.
400 Budget <id> is the budget of organization <org>. ...A budget that an organization uses cannot be deleted.The organization still points at it.Give the organization another budget first.
400 Invalid budget_duration '<value>'. ...The reset period cannot be read.A value like 1hr or 2 weeks.Use a number and a unit such as 1h, 7d, 2w or 1mo, or daily, weekly or monthly.

See budget management for every message.

Cost optimization​

GET /auto_router/benchmarks, GET /auto_router/session and GET /cost_optimization/prompt_caching/requests answer errors as {"detail": "<message>"}.

Status and messageMeaningCausesFix
400 end_date must not be earlier than start_dateThe range is reversed.Swapped dates.Swap them.
400 Invalid date format: <value>. Expected: 'YYYY-MM-DD'/auto_router/benchmarks could not read a date.A full timestamp or a short month.Send 2026-11-01.
400 cursor_start_time and cursor_request_id must be provided togetherOnly half of the next page cursor was sent.A client that copied one field of next_cursor.Send both.
403 Only proxy admin roles can view auto-router benchmarks across the deployment or Only proxy admin roles can view prompt caching requestsThe data covers every team.A key that is not a proxy admin or admin viewer.Use an admin key.
404 No auto-routed turns recorded for session '<id>' under this keyThe session has no billed auto routed turn under the calling key yet.A new session, or another key's session.Wait a few seconds after the first turn, and call with the key that ran the session.

See cost optimization for every message.

Health checks​

Status and messageMeaningCausesFix
503 {"status": "unhealthy", "db": "disconnected"} or "stalled" from /health/readinessThe pod is taken out of rotation because its database does not answer.A database outage or a broken network path.Fix the database, or set allow_requests_on_db_unavailable: true to keep serving.
403 {"error": "key not allowed to health-check model <model>"}The key named a model it may not call on /health.A team key probing another team's model.Use an admin key or a key with the model.
422 "<service>" is not set up on this gateway. .../health/services was asked to test an integration that is not configured.A missing success_callback or alerting entry.Configure the integration first.
401 Invalid or missing X-Drain-Token/health/drain refused the call and changed nothing.A wrong or missing header, or no drain token configured.Set drain_endpoint_token or DRAIN_ENDPOINT_TOKEN and send it.

See health checks for every message.

Fallbacks and reliability​

Status and messageMeaningCausesFix
404 Model '<model>' not found in routerPOST /fallback named a primary model the gateway does not serve. The body lists available_models.A typo or a model not added yet.Use a name from available_models.
400 Invalid fallback models: [...] or Model '<model>' cannot be its own fallbackThe fallback list is not usable.An unknown name, or the primary model in its own list.Fix the list.
400 router_settings key 'fallbacks' is set in the config file and cannot be changed here.config.yaml owns that fallback list, and the file would win again on restart.The list is in the file.Edit the file, or remove the list from it.
400 Database storage not enabled. Set 'STORE_MODEL_IN_DB=True' ...Fallback writes are stored in the database.STORE_MODEL_IN_DB is not True.Set it and restart.
429 No deployments available for selected modelEvery deployment of the group is cooled down or at its limits.A provider outage or limits that are too low.See cooldowns.

See fallback management and reliability.

App trace uploads​

Status and messageMeaningCausesFix
400 Content-Encoding must be gzip or identity. or The gzip body could not be decompressed.POST /v1/traces or POST /v1/logs got a body it cannot read.An unsupported compression, or a broken gzip body.Use gzip or no compression.
413 The upload is larger than the gateway accepts. Send smaller batches.The upload is bigger than OTLP_MAX_BODY_BYTES, before or after decompression.A very large exporter batch.Lower the batch size, or raise the limit.
501 Lens is not set up on this gateway. Configure SPANWAY_LENS_URL to store app spans.There is nowhere to store spans.Lens is not connected.Set SPANWAY_LENS_URL and SPANWAY_LENS_SERVICE_TOKEN.
503 The gateway is relaying other uploads. Retry after Retry-After seconds. or Lens did not accept the upload. Retry after Retry-After seconds.The upload was not stored this time.The gateway is at OTLP_MAX_CONCURRENT_INGESTS, or Lens is down.Exporters retry on their own. Check Lens if it repeats.

See app traces and provider attempts.

Response cache​

Status and messageMeaningCausesFix
403 Not allowed to set <control> as a cache control. Contact admin to change permissions.A request sent a cache control its key may not use.The key's allowed_cache_controls leaves it out.Add the control to the key, or drop it from the request.
400 Cache type local does not support deleting a key, ... flushing or ... redis infoThe cache management routes need Redis.A local or other non-Redis cache.Use a Redis cache.
503 Cache not initialized. spanway.cache is NoneNo response cache is configured.Caching was never set up.Save cache settings.
404 No cache settings are saved, so there is nothing to turn off.DELETE /cache/settings found no saved cache settings.The cache was never saved from the Admin UI, or it comes from the config file.Turn a config file cache off in the config file.

See caching and the Response Cache page.

Data policies​

Status and messageMeaningCausesFix
400 No deployment of model '<model>' satisfies the data policy: ...Every deployment was rejected by the key's, team's or organization's data policy.Undeclared or non-qualifying terms, or regions outside allowed_regions.Declare the terms on a deployment that meets them, or use another model.
400 This <surface> request goes to the provider directly without a configured deployment, so the data policy (...) cannot be verified. ...A call that skips the router was refused while a policy applies.Client credentials or a provider pass-through route.Call a configured model group.
403 Only proxy admins can set data_policy on this <entity>. ...Only proxy admins may change a data policy.A team or organization admin sent a different policy.Ask a proxy admin.
500 general_settings.required_model_region is enforced but unsetEnforcement is on with no usable region, so requests are refused.The region was cleared or is invalid.Set a valid region or turn enforcement off.

See data policy errors for every message.

Cost tracking and pricing​

Status and messageMeaningCausesFix
403 model_cost_map_missing, Model '<model>' has no pricing in the cost map, so spanway cannot price the request. ...A block switch is on and the model has no price.A new or private model without input_cost_per_token and output_cost_per_token.Add a price, or turn off block_requests_for_models_without_pricing or block_unpriced_models_when_budgeted.
400 This model isn't mapped yet. model=<model>, custom_llm_provider=<provider>. ...POST /spend/calculate cannot price the model.The model has no price.Add a price with custom pricing.
400 Discount for <provider> must be between 0 and 1 (0% to 100%) and the other discount and margin messagesA discount or margin value is out of range or has the wrong shape.A percentage sent as 5 instead of 0.05, or an empty margin object.See custom pricing errors.
500 Failed to read cost discount config: <reason>The stored values could not be read.A database problem.Check the database. The Admin UI refuses to save until the values load.
502 Failed to reload model cost map: <reason>. Current pricing data was kept.A price map reload failed.An unreachable URL or a digest mismatch.Check SPANWAY_MODEL_COST_MAP_URL and SPANWAY_MODEL_COST_MAP_SHA256.

Tags​

The /tag/* routes answer errors as {"detail": "<message>"}.

Status and messageMeaningCausesFix
400 Tag <name> already exists/tag/new used a taken name.A second create.Use /tag/update.
404 Tag <name> not found or Tags not found: ['<name>']The tag is not defined.A typo, or a dynamic spend tag that was never created.Create it, or check the name.
401 Not allowed to access model due to tags configuration. Passed model=<model> and tags=[...]Tag filtering found no deployment for a tag the model group knows.No deployment carries the tag, and none is tagged default.Tag a deployment, see tag routing.
400 Client-side '<source>' not allowed in request. ...reject_clientside_metadata_tags is on and the request set its own tags.Tags in metadata.tags, tags or x-spanway-tags.Set tags on the key or team.

Models​

Status and messageMeaningCausesFix
404 Model <id> not found on proxy.No loaded deployment has that id.A wrong id, or the reload interval has not passed.Copy the id from Models + Endpoints.
400 model_info.id is required. Send the id of the deployment to update./model/update got no id.A body without model_info.id.Send the id.
403 with the Enterprise license messageTeam-scoped deployments need a license.model_info.team_id set on a gateway without one.Add a license.
403 Only proxy admins can update the AI hub useful links. Your role=<role>Saving AI hub links is admin only.A non-admin session.Use a proxy admin.

See model management for every message.

Credentials and encryption​

Status and messageMeaningCausesFix
409 Credential '<name>' is defined in config. Edit config.yaml to change it.A create used the name of a config credential.A name clash with config.yaml.Pick another name.
405 Credential '<name>' is defined in config and cannot be edited from the API or UI.Update and delete do not touch config credentials.A credential from config.yaml.Edit the config file.
401 An authenticated user is requiredPersonal connections need a key that belongs to a user.The master key or a key without a user.Use your own virtual key.
400 invalid or expired flow_handleThe connect flow handle is not valid for this user.An old code, another user's handle.Start the connect flow again.
503 could not revoke cached connection, retryA disconnect could not clear the cached token.Redis was unavailable.Retry once Redis is back.
502 saying the device flow completed without a tokenThe provider approved the code but sent no token.A provider problem.Start again.
400 Encryption migration requires general_settings.encryption_algorithm: 'aes-256-gcm'. ...The AES format is not on.encryption_algorithm unset.Set it and restart.
400 Cannot migrate covered tables: no salt key / master key is set. ...There is no key to encrypt with.No SPANWAY_SALT_KEY and no master key.Set SPANWAY_SALT_KEY.
503 Could not read <location>: <reason>. The scan stopped, so this run attests nothing. ...A storage location could not be read.A database problem during the check or migration.Fix the database and run again.

Spend reports and exports​

Status and messageMeaningCausesFix
403 Your Spanway license does not include the 'spend_reports' feature. ...The spend report routes are licensed.A license without spend_reports.Add the feature to the license.
401 Authentication Error, Tried to access route=/global/spend/reset, which is only for MASTER KEYOnly the master key resets spend.A proxy admin's own key.Use the master key.
503 OPENAI_ADMIN_KEY is not set on the proxy, so the openai bill cannot be readThe capture rate check cannot read the bill.No admin key on the gateway.Set OPENAI_ADMIN_KEY.
502 Could not read the openai bill: <reason>The provider billing API failed.A key without the costs permission.Fix the key's permissions.
401 or 403 on /usage/ai/chatAsk AI is for proxy admins only.Another role.Use a proxy admin session.

| 403 Not authorized to view spend log for request_id=<id> | The request log row belongs to someone else. | A caller who is not a proxy admin searched for or opened another person's request, or retention removed it. | Use your own request, or ask an admin. | | 403 Not authorized to view team spend for team_id=<id> | The caller may not read that team's request logs. | Not a team admin and no /spend/logs team permission. | Ask a team admin to grant the permission. | | 400 Invalid date format: <date>. Expected: ... | A request log date is malformed. | A script sent another date form. | Send the form the message names. |

See spend reports, spend logs and exports and cost exports.

Data access governance​

Status and messageMeaningCausesFix
400 None of the requested fields are hidden for your role, so there is nothing to revealPOST /spend/logs/ui/{request_id}/reveal was asked for fields the caller can already see.A caller without a custom role, or one that hides other fields.Open the request normally.
403 Your role may not reveal hidden log fields. Ask an admin for the logs.reveal permissionThe caller's custom role hides the field but does not grant logs.reveal.A role made to hide content for everyone who holds it.Grant logs.reveal to the people who need it, on a separate role.
404 No request log with this id is visible to youThe reveal named a request the caller may not open.A wrong id, or a request of another key or team.Copy the id from the Logs page.
409 Revealing a hidden field needs audit logging turned on, so the reveal can be recordedThe gateway refuses a reveal it cannot record.store_audit_logs is off.Turn on audit logging.
503 The reveal could not be written to the audit log, so the content stays hidden. Try again in a momentThe revealed audit row was not stored, so the content was not shown.A database timeout, a lost connection or a failed write.Try again, and check the database if it repeats.
403 The export ledger needs a Spanway enterprise license. ...GET /audit/exports is licensed.No valid license.Add a license.
400 since must not be later than untilGET /audit/exports got an inverted window.The dates were swapped.Swap them back.

See data access governance.

Inference endpoints​

Status and messageMeaningFix
400 <route>: Invalid model name passed in model=<name>. Call /v1/models to view available models for your key.No model group with that public name exists, or the key cannot see it. An unknown model is a 400, not a 404.Check the name with GET /v1/models, see supported endpoints.
400 <route>: Missing required parameter: '<param>'.A field the route needs, such as messages on chat or input on Responses, is missing or null.Send the field.
400 Mock testing request params are disabled on this proxy: mock_timeout. ...The request carries a mock_* test field and general_settings.dangerously_allow_mock_testing_request_params is off.Remove the field, or turn the setting on for a staging gateway, see settings.
400 Rejected Request: <field> is not allowed in request body. Clientside passthrough requires explicit admin opt-in via either general_settings.allow_client_side_credentials = true (proxy-wide) or configurable_clientside_auth_params on the deployment in your proxy config.yaml. ...The body names a client side credential or endpoint, such as api_key, api_base or base_url, that the admin has not allowed callers to set. The inference routes and the API Playground's POST /utils/transform_request both check this.Remove the field, or let callers set it with allow_client_side_credentials or the deployment's configurable_clientside_auth_params, see settings.
400 Rejected Request: model_list is not allowed in the request body.The body tries to define its own deployments.Remove model_list. Deployments are added by admins on Models + Endpoints.
400 Rejected Request: URL-valued fallback destination '<url>' is not allowed. ... or Rejected Request: fallback nesting exceeds the allowed validation depth.A fallbacks entry in the body points at a URL, or nests too deep.Name fallback models instead, or add the host to spanway_settings.provider_url_destination_allowed_hosts.
400 Rejected Request: spanway_credential_name='<name>' names a credential configured for workload identity federation or OAuth token exchange ...The body tries to pick a credential that only an admin may attach to a deployment.Remove spanway_credential_name, and ask an admin to attach the credential to the deployment.
400 a guardrail's messageA guardrail blocked the prompt or the answer. Guardrail blocks are 400, not 403.Change the content, see guardrails.
403 Model is blockedEvery deployment of the model group is paused.Unpause a deployment on Models + Endpoints.
403 Forbidden. This response id was not issued by this proxy, ...A Responses call named a previous_response_id the gateway never issued.Use ids this gateway returned, or set general_settings.allow_unmanaged_response_ids: true.
403 Forbidden. The response id is not associated with the user, who this key belongs to. ... (or team)The response id belongs to another user or team.Use your own response ids, or set general_settings.disable_responses_id_security: true on a single tenant gateway.
404 Polling response <id> not found or expiredA background Responses call polled through the cache is unknown or past its ttl.Poll sooner or raise spanway_settings.responses.background_mode.ttl.
500 Redis cache not configured. Polling requires Redis.Background polling through the cache is on but no Redis cache is configured.Configure the Redis cache, or turn polling_via_cache off.

Auto routers​

Status and messageMeaningFix
403 At most 1 auto-router(s) ... can be registered but this would make 2. A Spanway license with the 'auto_router' feature lifts the limit.A gateway without that license feature allows one auto router of each kind.Load the license or keep one router, see auto routing.
403 This auto-router belongs to a different team, You are no longer a member of this auto-router's team, This auto router's team is blocked. or The member auto-router configuration is invalidA team scoped router refused the caller.Use a key of the router's team, or fix the team or router.
503 Cannot verify auto-router model access without a databaseA team scoped router needs the database to check access.Restore the database connection.
500 AdaptiveRouter[<name>]: no models meet min_quality_tier=<n>The requested minimum quality tier is above every candidate, see adaptive router.Send a lower tier or add a model at that tier.
500 QualityRouter: no model available for quality tier <n> and no default_model configuredNo candidate declares any tier, see quality router.Declare quality_tier or set a default model.
404 No adaptive_router is configured on this proxy.GET /adaptive_router/state found no adaptive router.Add one and restart.

Fine-tuning​

Status and messageMeaningFix
403 Fine-tuning needs a Spanway enterprise licenseNo valid license is loaded.Load a license.
400 Fine-tuning through a provider needs a finetune_settings block in config.yaml, and this gateway has none.No provider credentials are configured for fine-tuning.Add finetune_settings, see fine-tuning.
400 No finetune_settings entry in config.yaml matches custom_llm_provider='<provider>'. ...The call names a provider without an entry. The gateway never falls back to its own process credentials.Add an entry for that provider.
400 Invalid request, No spanway managed file id or custom_llm_provider provided.A raw id was sent without a provider.Send custom_llm_provider or a managed id.
400 Spanway doesn't support <provider> for '<operation>'. Only ... are supported.The provider does not support that operation through the gateway.Use a listed provider.

Batches​

Status and messageMeaningFix
400 /batches: Missing required parameter: '<field>'.input_file_id, endpoint or completion_window is missing on create.Send all three, see batches.
400 Expected 1 model, got <n>A create call named several models in target_model_names.Name one.
400 Batches for <model> run inside Spanway, so the input file must be a Spanway managed file: ...The model has no provider batch API and the file was not uploaded through the gateway with the model named.Upload with x-spanway-model or target_model_names, see batches that run inside the gateway.
400 Spanway-executed batches need a database: set DATABASE_URL ...A batch that runs inside the gateway needs the database.Connect the database.
400 Invalid Spanway managed batch ID. Missing model_id.The batch id was changed or truncated.Use the id the gateway returned.
400 Cannot cancel a batch with status '<status>'The batch already finished.Nothing to cancel.
400 Invalid 'limit': integer above maximum value. Expected a value <= 100, ...GET /v1/batches was sent a limit outside 0 to 100.Send a limit in range.
404 No such File object: <id> on createNo model or provider was named and the gateway has no OpenAI key to fall back to.Name the model or the provider, see routing a batch.
404 No batch found with id '<id>'. or Batch <id> not foundThe id is unknown to the provider or the gateway.Use the id the gateway returned.
429 Batch file upload limit reached, the file was not forwarded to the provider: ...max_batch_file_uploads_per_day was reached for the key or team.Wait for 00:00 UTC or raise the limit.
500 Server configuration error: team metadata field 'enforced_batch_output_expires_after' ...The team's Batch Output Expiry (seconds) value is malformed.A proxy admin fixes it, see team batch output expiry.
Status and messageMeaningFix
400 /search: Missing required parameter: 'search_tool_name'.A search named no tool and the gateway has no default model.Send the tool in the path or as search_tool_name, see search.
400 The search request body must be a JSON object, ...The search body is not JSON, or is a list.Send a JSON object.
422 detail list on /v1/searchThe body breaks the request shape, such as max_results outside 1 to 20.Fix the named field.
409 A search tool named <name> already exists. ...POST /search_tools or a rename used a taken name, also when two saves race for the same name.Pick another name, see Search Tools page.
500 Could not save the search tool. The gateway log has the cause.A search tool write failed inside the gateway. The other search tool routes answer the same shape, for example Could not list the search tools. ....Read the Error adding search tool to db or Error updating search tool log line.
422 search_tool_name may only use letters, numbers, hyphens and underscores, ... or search_provider '<x>' is not supported. ...A search tool could never be called by that name, or names an unknown provider.Use a callable name and a supported provider.
400 The destination (api_base) changed while the stored secret (api_key) was left out or sent back masked. ...PUT /search_tools/{id} moved the tool to a new address with the masked key.Send the provider key again.

Files​

Status and messageMeaningFix
400 Raw provider file ids cannot be used when require_managed_files is enabled in spanway_settings. ...Only managed ids are accepted on this gateway.Use the managed id, see managed files.
400 target_model_names is required when require_managed_files is enabled in spanway_settings. ...Uploads must name their models on this gateway.Send target_model_names.
403 The caller does not have access to this managed file id.The file belongs to another team or user.Use a key of the owning team.
413 Uploaded file exceeds the configured max_file_size_mb of <n> MB ...The upload is over general_settings.max_file_size_mb.Raise the limit or split the file.
500 Managed files hook not found. Managed files need a database.Managed files are licensed but no database is connected.Set DATABASE_URL.

Containers and assistants​

Status and messageMeaningCausesFix
403 This key cannot use container <id>. A container can only be used by the user, team, organization or key that created it, or by a proxy admin.A container route, or the code interpreter tool on /v1/responses, named a container this key does not own.Another team's container id, or a container whose owner was never recorded.Use the owner's key, or let the tool create a container with {"type": "auto"}.
403 Unable to record container ownership: caller has no identity scope.The gateway has no user, team, organization or key to record as the owner, so it refuses to create an unowned container.A caller that is not a virtual key.Call with a virtual key.
400 Missing required 'file' fieldA container file upload had no file form field.The body was sent as JSON, or the field has another name.Send multipart form data with a file field.
400 Assistants are not configured on this gateway. Add an assistant_settings block with custom_llm_provider to config.yaml, ...The gateway does not know which provider account holds the assistants.No assistant_settings in the config file.Add assistant_settings and restart.

See containers, container files and assistants for every message. The upload size limit is in the 413 table.

Server tools and interception​

Status and messageMeaningCausesFix
403 Server tools not enabled on this gateway: [...]A request asked for a server tool the gateway has not turned on.The tool is not in general_settings.server_tools.enabled_tools.Turn the tool on, see server tools.
403 Server tools not enabled for this key or team: [...]The tool is on, but this key or its team has no grant for it.No grant on the key or team.Grant the tool on the key or team.
403 Key requests server tools not granted to team '<team id>': [...]. Team grants: [...].A key create or update asked for tools its team does not have.The team was never granted them.Grant them to the team first, or remove them from the key.
403 Only a proxy admin can change the server tools granted to a team. or Only a proxy admin can grant server tools to a key that is not in a team.Server tool grants are an admin decision.A team admin or internal user changed the grants.Ask a proxy admin, or put the key in a team.
400 Unknown server tools [...]. Known server tools: [...]A grant names a tool that does not exist.A typo.Use a name from the list.
400 Invalid or unsupported server tool ..., max_tool_calls must be an integer or max_tool_calls must be between 1 and 30A spanway: tool entry or its call limit cannot be used.An unknown type, a wrong field value, or a limit outside 1 to 30.Fix the entry the message names.
400 spanway: server tools are only available on /chat/completionsA spanway: tool was sent to another route.Responses, Messages or another endpoint.Send it to /v1/chat/completions.
Request fails with Exceeded max_agentic_loops=<n> for model=<model>Web search interception stopped a model that kept searching.The model called the search tool more often than max_agentic_loops.Raise the value, or ask the model to search less, see web search interception.
Request fails with CodeInterpreterInterception: no sandbox available. ...Code interpreter interception has no sandbox to run the code in.sandbox_tool_name names no entry in sandbox_tools.Fix the name or add the entry, see code interpreter interception.

Media endpoints​

Status and messageMeaningFix
400 Multipart OCR request must include a 'file' field ..., Uploaded file is empty, Invalid JSON in request body: ... or document type 'file' is not supported through the JSON API. ...The OCR request is malformed, see OCR.Fix the request.
413 OCR file exceeds the size limit of 50 MBOCR uploads are capped at 50 MB.Split the document.
422 Cannot specify both 'image' and 'image[]' or Cannot specify both 'mask' and 'mask[]'An image edit sent both forms of a file field, see image edits.Send one.
400 File size is too large. Please check your file size. Passed file size: <n> MB. Max file size: <m> MBA transcription upload is over the deployment's max_file_size_mb, see audio transcription.Send a smaller file.
400 The request names no realtime model. Send session.model or model.A realtime client secret request named no model, see realtime.Name the model.
400 A realtime client secret can only be created with a virtual key.The caller authenticated without a virtual key, for example with the master key.Mint the secret with a virtual key.
401 Invalid or expired token or Token has expired on /v1/realtime/callsThe client secret is unreadable, was minted before the gateway bound secrets to keys, or has expired.Mint a new client secret.

Guardrail providers​

Status and messageMeaningFix
400 Violated guardrail policy or the provider's reasonA third-party guardrail blocked the request or response.Change the content or the provider's policy, see guardrail providers.
500, 502, 503 or 408, for example Security scan failed - request blocked for safety, Akto guardrail service unreachable, Bedrock guardrail throttle retries exhausted, Error in Pangea Guardrail, RepelloAI Argus guardrail unreachable or Pillar Security Guardrail UnavailableThe provider could not be reached, timed out or failed, and it is set to block in that case.Check the provider's status, key and URL. Use its fail open switch only where unchecked traffic is acceptable.

Tool policies​

Status and messageMeaningFix
400 {"error": "Violated tool policy", "blocked_tools": [...], "message": "Tool(s) [...] are blocked by policy."}The tool_policy guardrail refused a request that lists or calls a blocked tool, see tool registry.Remove the tool from the request, or unblock it.
503 {"error": "Tool policies not loaded", ...}The guardrail is on but this gateway has not loaded tool policies yet.Check the database and general_settings.supported_db_objects.
400 Provide either team_id or key_hash, not both, output_policy applies to every caller, so send it without team_id or key_hash, Send the hashed key in key_hash, not the raw sk- key, because URLs are written to access logsA /v1/tool/policy or overrides request is malformed.Fix the request as the message says.
404 No override found for tool '<name>' with the given scopeThere is no block to lift for that team or key.Check the team or key.

Prompt management​

Status and messageMeaningFix
403 {"error": "You are not authorized to access this prompt: <id>. Your key's or team's prompts list does not include it"}An inference request named a prompt outside the key's or team's prompts list, see prompt management.Add the prompt to the list, or use another key.
400 Cannot update config prompts., Cannot delete config prompts.The prompt comes from config.yaml.Change it in the config file.
403 Only proxy admins can create prompts, ... update prompts, ... patch prompts, ... delete promptsThe key is not a proxy admin.Use an admin key.
404 Prompt with ID <id> not found, ... not found in environment <env>No version of that prompt exists there.Check the id and environment.
500 Failed to initialize prompt, Failed to update prompt, Failed to patch prompt, Error converting prompt file: ...The template could not be loaded or the .prompt file could not be read.Fix the template and retry.
409 The production environment is protected. Save the change in another environment and promote it with POST /prompts/<id>/promote, or remove production from the protected environments.A save, patch or delete went straight to a protected environment, see protected environments.Save in development or staging and promote the tested version.
400 Promoting into production needs a passed eval run of <id> <env> version <n>. ...The target is protected and the eval verdict is required, but no eval_run_id was sent, see promotion.Run an eval of that exact version and send its run id.
409 Eval run <run> tested <what>, not <id> <env> version <n>The run tested a different prompt, version or environment.Run an eval of the version you are promoting.
409 Eval run <run> did not pass its quality gate: the verdict is <failed, neutral, pending or error>The run's quality gate did not pass. neutral means the run has no gate.Fix the prompt, or give the run a gate, and run it again.
404 Eval run <run> not found, Prompt <id> has no version <n> in <env>The run or the version does not exist.Check the ids.
403 The 'evals' feature needs a Spanway enterprise license that includes it.The eval check needs evals in the licence.Add evals to the licence, or turn off Require a passed eval to promote.
400 Cannot promote: Unknown partial <name>The text includes a partial that no longer exists.Save the partial again, or remove it from the prompt.
409 Cannot promote: partial <name> version <n> was saved after eval run <run> started, so the run did not test it. ...A partial the prompt uses, directly or inside another partial, changed after the eval run started, so the run never tested that text.Run the eval again and promote with the new run.
409 Partial <name> is still used by <prompt> (<env>), partial <other>. Remove it from those prompts and partials first.A stored prompt version or another partial still includes the partial, see partials.Remove the include from those prompts and partials first.
400 Pulled prompts cannot be saved in <env> because it is protected. Pick another environment., 409 The <env> environment is protected, so pulled prompts cannot be saved there.A repository connection points at a protected environment, see Git sync.Use development or staging and promote from there.
400 The GitLab address is not allowed: ...The self-managed GitLab address resolves to a private network address.Use the public address, or add the host to user_url_allowed_hosts.
400 The stored access token cannot be read with this gateway's key. ...The salt key changed since the connection was added.Delete the connection and add it again.
502 GitLab answered 401 Unauthorized, Bitbucket answered 404 Not Found, ... could not be reached: ConnectErrorThe repository host refused the call or could not be reached. The reason is also kept as the connection's last error.Check the token's access, the repository path and the branch.

Evaluator operations​

Status and messageMeaningCausesFix
400 Lens traces cannot be read: Lens is not configured on this gatewayA rule test or backfill asked for Lens traces.Lens is not set up on this gateway.Set up Lens, or use logged requests.
400 Lens traces cannot be read: your key may not read tracesThe caller cannot read Lens traces.A key without trace read access.Use a key that may read traces.
400 a rule with a judged scorer needs judge_budgetA backfill of a judged rule has no spending cap.judge_budget was left out.Send judge_budget.
400 the rule has a scorer that no longer parsesThe saved rule cannot score.A stored scorer became invalid.Edit the rule and fix its scorers.
400 no request in queue <id> was scored by this ruleThe agreement has nothing to compare.The review queue and the rule share no request.Add requests the rule scored to the queue, or backfill them.
404 version <n> of rule <id> not foundNo saved version has that number.A typo, or a version of another rule.List the versions first.
409 a backfill of this rule is already runningOne backfill per rule runs at a time.A second start.Wait for it, or cancel it.
409 the backfill is <status>, not runningThe backfill already ended.A late cancel.Nothing to do.

See evaluator operations for every message.

MCP connector catalogue​

Status and messageMeaningFix
400 Unknown catalog_entry '<x>': it must name a connector in the MCP cataloguePOST or PUT /v1/mcp/server named a connector that does not exist, see connector catalogue.Use a name from the catalogue.
400 MCP server '<id>' does not match a connector in the MCP catalogue, so it has no read-only default. Use allowed_tools to restrict its tools.Write tools were set on a server that is not a catalogue connector.Use allowed_tools.

Human approval​

Status and messageMeaningFix
403 {"detail": {"error": "approval_required", "message": "Tool <tool> needs a human approval before it can run. ...", "policies": [...], "approval_id": "..."}}A human approval policy matched an MCP tool call, and a request was raised. Calling again before anyone decides returns the same approval_id.Wait for an approver, then retry the exact call with the x-spanway-approval-id header.
403 approval_grant_rejectedThe approval id does not cover this key, tool and arguments, or was already used once.Retry the exact call that was approved, or raise a new request.
403 flagged_call_blocked "A guardrail flagged tool for a human approval, but no approval policy covers flagged calls for this key, so the call was blocked."A guardrail such as write action alignment asked for a person to look at the call, and no approval policy with match.kind mcp_flagged_calls covers the key.Add a flagged calls policy, or set the guardrail to block.
503 approval_unavailable "the approval policies could not be read"The gateway could not read the approval policies, so it refused the call instead of letting it run.Check the database, then retry.
503 approval_unavailable "a guardrail flagged this tool call for approval, but the approvals database is not set up"A guardrail such as write action alignment with on_mismatch: require_approval flagged the call, and the gateway has no database to hold an approval request, so it refused the call.Connect a database, or set the guardrail's on_mismatch to block.
Workflow step approval_rejected, approval_expired, approval_cancelledAn approver rejected the step, nobody decided before timeout_seconds, or the request was withdrawn or its run cancelled. The step fails and so does the run.Fix the reason, then resume the run, which asks for approval again.
Workflow step approval_unavailableThe approval check could not run, or a key already had 25 requests waiting, or more than five policies matched. The step retries when its retry policy allows.Check the database and the matching policies.
403, 404, 409, 410, 422 and 503 on /v1/approvals/...Decisions, policies and approval links refused, for example "You are not an approver for this request at its current level".See the human approval errors for each message.

Environment promotion​

Status and messageMeaningFix
409 This is environment '<name>', not '<target>'A plan was sent to a gateway with a different environment name.Send it to the right gateway.
409 This environment has no name. Set general_settings.environments.name on the gatewayThe gateway has no environment name.Set it and restart.
409 These secret references do not resolve on this gateway: ...The bundle uses a secret the target does not have, so the plan cannot be applied.Define the secret, then plan again.
403 The person who made a plan cannot approve itThe planner tried to approve.A second person approves.
404 Organization <id> not found or Plan <id> not foundThe organization is not one you administer, or the plan id is wrong or shortened.Use your own organization and the full plan id.
413 A bundle may be at most 2097152 bytesThe plan request is over 2 MiB.Export fewer kinds.
422 {"detail": {"error": "...", "problems": [...]}}The bundle holds inline secrets or references the scope may not use, or an export has more than 500 objects.Fix each problem at its path.

The environment errors list every message.

Memory​

Status and messageMeaningFix
401 Authentication Error, Only proxy admin can be used to generate, delete, update info for new keys/users/teams. Route=/v1/memory...The memory routes are for proxy admins today.Use a proxy admin key.
409 Memory with key '<key>' already exists.Keys are unique across the whole gateway, and another entry, possibly one you cannot see, holds this one.Use a namespaced key such as user:123:notes.
403 Only proxy admins may set user_id to a different user.The body names a scope other than the caller's.Leave user_id and team_id out.
404 Memory with key '<key>' not foundNo entry with that key is visible, or the retention job deleted it.Check the key on the Memory page.

MCP gateway​

Status and messageMeaningFix
400 An MCP server with <field> '<value>' already exists (server_id=<id>). ...A server name or alias is taken, ignoring case.Pick another name.
403 {"error": "Forbidden", "details": "... This gateway only admits client applications listed in mcp_allowed_clients."}The MCP client is not on the client allow list.Add it, or set mcp_client_id_header.
403 Tool '<tool>' is not allowed for your key/team on server '<server>'. Contact proxy admin for access.The key may not call that tool.Grant the tool, see access control.
403 Tool <name> is not allowed for server <server>. Contact proxy admin to allow this tool.The server itself keeps that tool off: a catalogue connector serves only its read tools until an admin enables a write tool by name, or the server's allowed_tools or disallowed_tools leave the tool out.Enable the tool by name on the server's Tool access tab or with PUT /v1/mcp/server/{server_id}/tool-policy, see enable a write tool, or leave it off.
403 MCP stdio command '<command>' is not in the allowlist (...)A stdio server names a command the gateway does not run.Use an allowed command or add it to SPANWAY_MCP_STDIO_EXTRA_COMMANDS.
404 server_not_foundNo registered server matches the id or name.Check it on MCP Servers.
404 MCP registry is not enabledGET /v1/mcp/registry.json is off by default.Set general_settings.enable_mcp_registry: true.
403 write_action_misaligned "The guardrail stopped tool because it does not match the user's request or the agent's purpose ()."The write action alignment guardrail judged that an agent's send, post, delete or update call did not fit what the person asked or what the agent is for. The category says how, for example different_target or missing_context.Check the agent's arguments against the request. If the call was wanted, set the guardrail's on_mismatch to require_approval so a person can let it through.
503 write_alignment_unavailable "The guardrail could not check tool (), so the call was blocked. Try again in a moment."The judge model timed out, failed or gave an unclear answer, so the write was refused rather than run unchecked. reason is timeout, judge_error or invalid_verdict.Check the judge model's health and the mcp_write_alignment log line, then retry.
400 Violated guardrail policy with unregistered_serversThe mcp_security guardrail, which blocks by default, refused a request naming a server the gateway does not know.Register the server or remove the tool, see MCP guardrails.
500 internal_server_error "An unexpected error occurred while calling the tool. Check the gateway logs for details."A REST tool call failed inside the gateway. The cause is only in the log.Look for Unexpected error in MCP tool call.
401, 403, 429, 502, 504 on GET /mcp-rest/tools/list with server_idListing one server failed and the status says why.See MCP tools over REST.
500 Could not save the MCP server. The gateway log has the cause.Creating, submitting or importing a server failed while saving.Read the Error creating mcp server or Error registering mcp server log line.
500 Could not stage the MCP server. The gateway log has the cause.The OAuth test of the server form failed to stage the server.Read the Error caching temporary mcp server log line.
500 Could not save the public MCP server list. The gateway log has the cause.POST /v1/mcp/make_public could not save, see AI hub.Check the database.

MCP OAuth and personal credentials​

Status and messageMeaningFix
401 byok_auth_requiredThe user has not stored a personal API key for a bring your own key server, or the key has no user. The answer starts the connect flow.Connect from the server card.
503 byok_auth_unavailable "BYOK credential check requires a database connection."Stored keys cannot be read without the database, so the call is refused.Check the database.
400 missing_client_idAn OAuth server has no client id and offers no registration.Set credentials.client_id, see MCP OAuth.
403 oauth_identity_binding_enforcedThe server enforces identity binding, so tokens cannot be stored directly.Connect through the gateway's OAuth flow.
403 oauth_principal_mismatchThe upstream token belongs to a different person than the one signed in.Sign in upstream with your own account.
403 oauth_identity_binding_failedThe identity in the upstream token could not be checked.Check oauth_identity_binding.
500, 503, 412 or 501 from the credential resolverThe server's credential settings cannot be used (500), the identity provider is unreachable (503), a precondition is missing (412), or the auth mode is not available here (501).Follow the message, see MCP OAuth.
500 Server misconfigured: mcp_session_token_signing is invalidThe session token signing block cannot be loaded.Fix the key or reference.

Agent traces and run ledger​

Status and messageMeaningFix
501 Agent tracing is not enabled. Configure the Lens service and SPANWAY_LENS_URL.The gateway has no Lens connection.Set SPANWAY_LENS_URL and SPANWAY_LENS_SERVICE_TOKEN, see agent traces.
403 Not allowed to view agent tracesThe key has no user.Use a key with a user, or an admin key.
400 {"code": "invalid_request", ...}A cursor or trace query is not valid.Restart without the cursor, or fix the query.
409 {"code": "trace_changed", ...}The trace changed while it was paged.Start again from the first page.
413 {"code": "too_large", ...}The view is too big.Use a filtered trace query.
503 {"code": "unavailable", ...} with Retry-AfterLens did not answer, or a trace query failed or ran past the reader limits.Retry after the given seconds.
503 Trace SQL queries require a configured proxy master keyThe gateway has no master key to sign trace queries.Set a master key.
403 Not allowed to view run ledgersThe key has no user.Use a key with a user, or an admin key, see run ledger.
403 {"error": "The 'agent_governance' feature needs a Spanway enterprise license that includes it."}The ledger includes agent calls.Add the feature.
500 Failed to fetch analytics. The gateway log has the cause.An activity aggregated or export query failed.Read the Daily activity export failed log line.
403 Your role hides request content, so it cannot run SQL over tracesA custom role hides prompts, responses or tool arguments, and trace SQL could read them.Use trace search and sessions, which hide that content, see trace search.

Trace search, sessions and comments​

These routes answer errors as {"detail": "<message>"}, or {"detail": {"code": ..., "message": ...}} when Lens fails.

Status and messageMeaningFix
400 q must hold at least one word to search forThe search text was only spaces or empty quotes.Type at least one word.
400 end_ms must be after start_ms and the window at most 31 daysThe search or session window is backwards or too long.Pick a window of 31 days or less.
403 Read only roles cannot change comments on tracesAdmin viewers and internal viewers may only read comments.Use a role that may write.
403 Only the author or a proxy admin can change this commentThe comment belongs to someone else.Ask its author or a proxy admin.
404 Session <id> not foundNo run you may read uses that session id in the window.Pass the session_ref from the session list, or widen the window.
404 Comment <id> not foundNo comment with that id on this trace.Reload the comments.
409 This trace already has 500 commentsThe trace holds the most comments allowed.Delete old comments.
503 {"code": "unavailable", ...}Lens did not answer, the search ran past the reader limits, or Lens answered rows the gateway does not understand.Retry, narrow the search, or run the same release of the gateway and Lens.

See search, sessions, agent graph and comments for every message.

Lens​

Status and messageMeaningFix
503 Set LENS_GATEWAY_SECRET to a shared secret of 32 to 512 bytes, the same on Spanway and LensThe gateway's Lens signing secret is missing or the wrong length.Set the same secret on the gateway and the worker, see Lens.
503 Set SPANWAY_LENS_URL to the Lens service URLThe Lens address is missing or not an http or https URL.Set it and restart.
503 Set SPANWAY_LENS_SERVICE_TOKEN to the same secret of at least 32 characters on Spanway and LensThe service token is missing or too short.Set the same token on both.
503 Lens service is unavailableThe worker did not answer.Check the worker.
503 Lens forwarding capacity is busy; retry shortly with Retry-AfterThe gateway is buffering as much Lens traffic as it allows.Retry after the given seconds.
413 Lens request is too largeThe request or answer is over 64 MiB.Ask for less, for example a shorter range.
403 Lens requires an authenticated user or keyThe request carried no user or key identity.Sign in again or send a key.
403 Your Spanway license does not include the 'evals' feature. ...A Lens datasets or evals path needs the evals feature.Add the feature.

Evals​

Status and messageMeaningFix
400 scorer <type> needs the evals extra installed on the proxyA judged metric needs components this image lacks.Use an image with them, or a native scorer, see Evals errors.
400 self_hosted needs <host> in general_settings.eval_self_hosted_scorer_hostsA self_hosted scorer is on a host the operator has not listed.Add the host to eval_self_hosted_scorer_hosts.
403 this ci key cannot run dataset <id>, it is not allowlistedThe CI key's allowlist lacks the dataset.Add it, see CI gating errors.
403 ci key limits could not be checkedThe gateway could not read the CI key's limits and refused rather than run unchecked.Check the database and Redis.
403 key cannot call model <model>The CI key's models list lacks a model the run or its judge uses.Add the model to the key.
409 already submitted: ... or run <run_id> is <status>Answers for a submitted run repeat, or the run already ended.Send only new items, or start a new run.
429 this ci key already has <n> runs in progress, wait for one to finishThe CI key reached EVAL_CI_MAX_ACTIVE_RUNS.Wait for a run to finish.
500 no models are configured on the proxySynthetic datasets and red team runs need a model.Add a model.
501 synthetic datasets need the evals extra installed on the proxyThe image lacks the eval components.Use an image with them.
502 the model produced no usable items or another generation failureThe model that writes synthetic items failed.Try another model or other documents.

Spanway Cloud data regions​

A Cloud signup names the region its workspace is stored in. Each region is its own gateway, so a gateway only creates workspaces in the region it serves. Both answers come back before anything is stored, screened or mailed, see Data regions.

Status and messageMeaningFix
421 workspaces in <region> are created at <signup_url>The signup chose a region another gateway serves. The body is {"detail": {"error": "...", "region": "<region>", "signup_url": "<url>"}}.Send the signup to signup_url, or open that page in a browser.
400 region <region> is not offered for new workspacesNeither this gateway nor any region in general_settings.cloud.region_signup_urls serves that region.Pick a region listed by GET /cloud/plans, or the operator adds the region.
500 general_settings.cloud is invalidregion_signup_urls names this gateway's own region, uses http://, or names an unknown region.Fix the entry the cloud: general_settings.cloud is invalid log line names.

Sanctions​

Requests refused for sanctions reasons answer with a stable code in {"error": {"type", "code", "message", "policy_url"}}, so clients can act on it.

Status and codeMeaningFix
451 sanctioned_jurisdictionThe request came from a place the sanctions policy restricts, or a Cloud signup gave a restricted address.Nothing to fix for a real restricted place. For your own office, add its egress to allow_networks, see geofence errors.
451 sanctions_location_unknownThe location could not be resolved and on_unknown is block, the geofence's location settings do not validate, or the gateway is Spanway Cloud.Name the CDN in geo.provider with trusted_proxy_ranges, or fix the settings the readiness check names.
451 sanctions_screening_holdA Spanway Cloud account is held while a possible list match is reviewed.A reviewer clears or confirms the case, see Cloud sanctions.
451 sanctions_restrictedA Spanway Cloud account was restricted after review.Contact support@spanway.ai.
451 sanctions_confirmed_matchA Spanway Cloud account was blocked after a confirmed list match.Counsel handles it.
503 sanctions_policy_unreadableThe jurisdiction policy file cannot be read, so the gateway fails closed.Fix policy_path or restore the file.
403 Only proxy admins can read the sanctions policyA non-admin called /sanctions/geofence.Use an admin or admin viewer key.
404 Not Found on /sanctions/screening, /sanctions/cases, /sanctions/reports or /sanctions/eventsSpanway Cloud is not enabled on this gateway.Screening runs on Cloud only.

License​

Status and messageMeaningFix
403 The '<feature>' feature needs a Spanway enterprise license. You must be a Spanway Enterprise user to use this feature. ...No valid Enterprise license is active.Set SPANWAY_LICENSE, see Spanway Enterprise.
403 Your Spanway license does not include the '<feature>' feature. Contact sales@spanway.ai to add it.The license is valid but does not list the feature.Ask for a license that includes it.
The '<feature>' feature needs a Spanway enterprise license that includes it.The same refusal from a workflow step or a startup check outside a route, for example general_settings.allowed_ips without ip_allowlist.Add the feature or remove the setting.
403 License is over limit. Please contact https://spanway.ai/support to upgrade your license.Creating the user or team would pass max_users or max_teams.Remove unused users or teams, or raise the limit.
400 Assigning team admins is a premium feature. ...The team admin role needs a license.Add the member as user, or add a license.
403 You must be a Spanway Enterprise user to use SSO for more than 5 users. ...SSO without a license allows 5 billable users.Add a license or unset SSO.

Compliance evidence​

Status and messageMeaningFix
404 evidence bundle <id> not foundThe id is wrong or retention deleted the bundle.Pick an id from GET /compliance/evidence.
409 stored evidence bundle does not match its checksumThe stored bundle changed after it was generated.Do not hand it over, generate a new one, see evidence errors.
422 Value error, retention period must be positive, got '<value>' on PATCH /compliance/retentionA retention period is zero, negative or not a duration.Send a value such as 90d.

Agents and A2A​

Status and messageMeaningFix
400 -32600 Invalid Request: jsonrpc must be '2.0'The A2A body is not JSON-RPC 2.0.Send "jsonrpc": "2.0", see A2A errors.
400 -32601 Method '<name>' not foundThe A2A method is not supported.Use a supported method.
400 -32602 Invalid params: ...The params do not fit the method.Fix the params.
400 Agent '<id>' requires x-spanway-trace-id header on all inbound requests.The agent requires a trace id on calls to it.Send x-spanway-trace-id or x-spanway-session-id.
400 Requests made with this agent's key must include the x-spanway-trace-id header.The agent requires a trace id on its own calls.Send the header.
400 Autonomous mode requires the Enterprise application service-principal object IDAn autonomous identity binding has no service_principal_id.Add it, see agent identity providers.
400 Agent settings must not contain values that start with 'spanway_enc::'A value in the agent's settings looks like stored ciphertext.Send the real value, never a value copied from the database.
401 Authentication Error, Key is blocked. Update via /key/unblock if you're an admin.The kill switch blocked the agent's key.Unblock or reissue the key once it is safe.
403 Agent '<agent>' is not allowed for your key/team. Contact proxy admin for access.Default deny, no grant matches.Grant the agent to the key or team.
403 Agent is disabled or Invoked agent is disabledThe agent is disabled.Re-enable it.
403 Token does not match the registered Entra applicationThe token is not a v2.0 token of the bound tenant and application.Compare the token with the binding.
404 -32000 Agent '<agent>' not foundNo visible agent with that name or id.Check the Agents page.
500 -32603 Internal error: the agent call failed. The gateway log has the cause.The upstream agent failed.Read the Error invoking agent log line.
500 <action> failed. The gateway log has the cause.An agent management or card call failed.Read the matching Error ... log line.
503 Agent policy could not be loaded or Managed agent policy requires a databaseThe identity policy could not be read.Check the database.
400 An OpenID Connect identity supports autonomous agents only. Set execution_mode to autonomousAn agent bound to an OpenID Connect provider was set to act on behalf of a user.Use Autonomous, see agent identity providers.
403 Token does not match the registered OpenID Connect application or Token subject does not match the registered agent subjectThe token's issuer, client id claim or sub is not the bound application's.Compare the token with the binding.
403 Only proxy admins can change an agent's stored credentials or Only proxy admins and admin viewers can list an agent's stored credentialsThe caller may not change or read the agent's stored credentials.Use an admin key.
404 No stored credential '<credential_id>' for agent '<agent_id>'The credential id is wrong, belongs to another agent or was deleted.List the agent's credentials and use an id from there.
400 No MCP server '<id>' exists or MCP server '<id>' signs in with <auth>. Agent credentials only replace an api_key, bearer_token, basic, authorization or token secretAn agent's MCP credential names a missing server, or one without a fixed secret.Pick a server with a fixed secret, or store a saas credential.
409 Agent already has a stored credential named '<name>' or Agent already has a stored credential for MCP server '<id>'Names, and MCP servers, are unique per agent.Rotate or delete the existing credential.
503 Set SPANWAY_SALT_KEY or a master key before storing agent credentialsThe gateway has no key to encrypt the secret with, so it stores nothing.Set SPANWAY_SALT_KEY and restart.
403 agent_credentials_suspended, agent_credential_revoked, agent_credential_expired or agent_credential_unreadable on an MCP tool callThe calling agent's stored credential for that server cannot be used, so the call is refused instead of using a shared secret.Rotate the credential, or turn off Suspend all credentials, see agent credentials.
503 agent_credential_unavailable on an MCP tool callThe agent's stored credentials could not be read from the database.Check the database and retry.
400 invalid_target or invalid_request from a token exchange with an agent tokenThe agent named no stored SaaS credential of its own in audience, the credential is revoked, expired or suspended, the agent is not bound to the token's application, or the token acts for a person.Read error_description, see agent credentials.

Custom agents​

Status and messageMeaningFix
400 Model ... does not exist or your key cannot call itThe agent's model is missing or not allowed.Pick a model your key may call, see custom agents.
400 An agent's own key cannot run a custom agent; use a user or team keyThe run used an agent key.Use a user or team key.
403 Agent ... is not allowed for your key or teamThe key or team is not granted the agent.Grant it.
404 Toolset ... does not existThe toolset is missing or not granted.Pick another toolset.
409 Custom agent ... was changed by someone else; reload it and try againTwo saves raced.Reload and save again.
409 Custom agent ... is disabledThe agent is disabled.Restore it.

AI hub and public catalogue​

Status and messageMeaningCausesFix
401 Authentication Error, No api key passed in.The AI hub is closed to visitors without a key.enable_public_model_hub is off, the default, or require_auth_for_public_ai_hub is on.Sign in or send a key, or open the hub, see AI hub.
400 No models configured on proxyThe hub or the catalogue has nothing to list.The gateway has no models loaded.Register models.
404 {"detail": "Public catalogue is not enabled"}GET /public/catalogue is off.public_catalogue is off, the default.Turn it on under Status Page, Public surfaces, see public catalogue.
422 useful link '<name>' must be an absolute http:// or https:// URLA useful link was refused.A relative path or another scheme.Use a full https:// address.
500 Failed to list the published skills.The skill hub could not be built.Usually the database.Read the log line Could not list the published skills.
500 Failed to list public model groups. or Failed to list public model group values.GET /public/v1/model_hub or GET /public/v1/model_hub/{facet} could not build its answer.Usually the database or the model list.Read the gateway log for the cause, then retry.

See AI hub and public catalogue for every message.

Skills​

Status and messageMeaningFix
400 skill_search_unsupported_providerA search query was sent for a provider account.Add custom_llm_provider=spanway_proxy, see skills.
400 skill_search_not_configuredskill_search_embedding_model is not set.Set it in spanway_settings.
503 skill_search_unavailableThe embedding call behind skill search failed.Check the embedding deployment.
404 No installable skill archive for: <id>The skill is missing or its upload is not an installable zip.Re-upload it as a zip with SKILL.md in one top-level folder.
500 <action> failed. The gateway log has the cause.A Skills page plugin route failed.Read the matching Error ... plugin log line, see plugin marketplace.

Decisions​

Status and messageMeaningFix
400 Streaming is not supported for the Decisions API. ...stream: true was sent.Remove it, see Decisions API.
400 Invalid Decisions request: ...A question breaks a rule.Fix the field named after the colon.
400 A model name is required for the Decisions APINo model and no default model.Send model.
400 Unknown Decisions provider '<provider>'. Supported providers: ...The provider does not serve decisions.Use a supported provider.
400 api_base is required for Decisions provider '<provider>'The deployment has no address.Set api_base.
400 <provider> does not support parameters: [...]audio, videos or safety_identifier is not supported by the model.Remove it or set drop_params: true.
400 Decisions provider '<provider>' cannot serve this request: ...The request cannot be translated.Use the model's own format.
400 Requests with '<field>' go through spanway.<function>The body belongs to the other Decisions route.Send it to the other route.
401 Missing API key for Decisions provider '<provider>'The deployment has no provider key.Add the key.

Data retention​

Status and messageMeaningCausesFix
400 no retention period givenPATCH /compliance/retention had no period in it.An empty body.Send at least one period.
400 general_settings key '<field>' is set in the config file and cannot be changed here.Nothing in the retention change was saved.One of the periods is set in config.yaml.Change it in the file, or remove it there to manage it from the API.
422 Value error, retention period must be positive, got '0d'A period is zero or cannot be read.A typo or a missing unit.Send a number with s, m, h, d, w or mo, such as 90d.
422 Value error, sanctions records must be kept at least 10 years (3653d) under ...The sanctions period is below the legal minimum.A shorter period was sent.Send 3653d or longer.
409 Another gateway instance is running the retention cleanup now. Try again when it finishesA manual cleanup run found the job already running.Another replica holds the cleanup lock.Wait and run it again.
500 The retention cleanup failed with <ErrorClass>. Check the gateway logs and retryA manual cleanup run stopped on an error.Usually a database timeout.Read the Error during spend log cleanup log line, then retry.

See retention for every message, including the license and role refusals.

Billing​

Status and messageMeaningCausesFix
404 account_id=<id> not found or invoice_id=<id> not foundNo billing account or invoice has that id.A wrong or deleted id.List accounts or invoices to find the id.
409 team <id> already has billing account ...The scope already has an account.A second create for the same team, organization or end user.Update the existing account.
400 invoice <number> is <status>, only draft can be issuedThe invoice is not in a status that allows the action.Issuing, marking paid or voiding an invoice in the wrong status.Check the invoice status.
422 period_end must be after period_startThe period is empty or backwards.period_end on or before period_start.Send a half-open period such as 2026-09-01 to 2026-10-01.
502 stripe: ...Stripe refused the call.A wrong STRIPE_SECRET_KEY or a Stripe account problem.Fix the key or the account and retry.
400 invalid Stripe signature, Stripe-Signature header missing, payload is not a Stripe event or STRIPE_WEBHOOK_SECRET is not setThe Stripe webhook refused the call.A wrong or missing signing secret, or a call that is not from Stripe.Set the secret from the Stripe endpoint.

See billing for every message.

Status page​

Status and messageMeaningCausesFix
403 Only proxy admins can read the status pageThe key may not read the overview, suggestions or incidents.A key that is not an admin or admin viewer, with no custom role granting status.read.Use an admin key.
403 Only proxy admins can change the status pageThe key may not open, update or resolve incidents.An admin viewer or another role.Use a proxy admin key, or grant status.write.
404 incident_id=<id> not foundNo incident has that id.A wrong id.List incidents to find it.
400 nothing to updateThe PATCH named no field.An empty body.Send at least one field.
409 incident_id=<id> is already resolvedThe incident is already resolved.A second resolve.Reopen it with a PATCH status if it is not over.
422 validation errorA field is not valid."status": "resolved" in a PATCH, a title over 200 characters or page_size over 100.Fix the named field, and resolve through POST .../resolve.
404 Public status page is not enabled/public/status is off.public_status is false.Turn on Serve GET /public/status on the Status Page.

See status page for every message.

Admission control and control plane​

Status and messageMeaningCausesFix
503 overloaded_error Worker at capacity: <n> in-flight, <m> queued requests. Retry later.The worker that received the request was full, so it refused the request before doing any work.queue_full when more requests wait than max_queued_requests_per_worker, or queue_timeout when one waited longer than admission_queue_timeout_seconds.Retry after the Retry-After header. If it repeats, raise max_in_flight_requests_per_worker or add workers.
404 /v3/login is only available on workers with control_plane_url configuredThe worker is not set up for the control plane.control_plane_url is not set on this worker.Set it on every worker the control plane manages.
400 Missing 'code' parameter/v3/login/exchange got no login code.A broken redirect.Sign in again from the control plane.
401 Invalid or expired login codeThe single-use login code was wrong, used or expired.A reload of the redirect, or a code exchanged on a different pod without shared Redis.Sign in again, and configure Redis on workers with several instances.
400 return_to does not match the configured control_plane_urlSSO was asked to return somewhere other than the control plane.A wrong control_plane_url on the worker.Set it to the control plane's exact address.
Startup error Trying to use `worker_registry`. You must be a Spanway Enterprise user ...The control plane needs a license.worker_registry set without an enterprise license.Add a license or remove worker_registry.
Startup error Worker URL must start with http:// or https://The config file's worker_registry lists a worker whose url has no scheme, so config validation refuses it and the gateway does not start.A bare host name such as worker-1.internal:4000.Write the full address, for example https://worker-1.internal:4000.

See admission control and control plane.

Admin UI sign-in and onboarding​

Status and messageMeaningCausesFix
401 Invalid credentials used to access UI. Check 'UI_USERNAME' and 'UI_PASSWORD', or the password set for your userThe username or password is wrong. When disable_env_credential_login is on the message names only the user's password.A typo, or the wrong account.Check the username and password, or reset it with an invitation link.
429 Too many failed sign-in attempts. Try again later.Sign-in is blocked for a while, with Retry-After.Too many failures for this username or source address.Wait the Retry-After seconds, or use the master key over the API.
403 Username/password login is disabled because SSO is configured and 'disable_password_login_when_sso_enabled' is set. Sign in via SSO.Password sign-in is turned off.SSO is set up and the setting is on.Sign in with SSO.
403 Two-factor sign-in is on for this account. Sign in from the Admin UI sign-in page.A form sign-in reached an account that needs two-factor.Signing in from a form other than the Admin UI page.Use the Admin UI sign-in page.
503 Two-factor sign-in is required but no database is connected, so it cannot be checked. ...Two-factor cannot be checked.require_mfa_for_password_login is on and the database is down.Restore the database, use the master key over the API meanwhile.
500 No Database connected. Set DATABASE_URL in .env. ...A database user cannot sign in without a database.DATABASE_URL is unset.Set it.
401 Invitation link does not exist in db., Invitation link has expired., Invitation link has already been used. or User does not exist in db.The invitation or reset link cannot be used.A wrong, expired or used link, or a deleted user.Ask an admin for a new link.
401 Invalid onboarding session for invitation link.The sign-up session does not match the link.The onboarding page was opened from another link or its session expired.Open the link again.
401 Invalid invitation link. The user id submitted does not match the user this link is for.The link belongs to another user.A tampered request.Open the link the admin sent.
500 Failed to create onboarding session. Please retry the invitation link.The password was set but the session could not be created, so the claim was rolled back.A database problem.Open the link again.

See getting started and self-serve onboarding.

SSO, SAML and CLI sign-in​

These come from Admin UI SSO, organization SSO and CLI sign-in. A SAML failure never shows the browser the reason, so nobody can probe the setup from outside. The reason is in the matching line of the log reference.

Status and messageMeaningCausesFix
401 after signing in at the identity providerThe gateway refused the person after the provider let them in.The email domain is not in ALLOWED_EMAIL_DOMAINS, or ui_access_mode is admin_only and the person is not an admin. For organization SSO, the domain is not verified for that organization or the account holds a gateway role.Add the domain, or see Admin UI SSO.
401 Could not process SAML response. The gateway log has the cause.The identity provider's SAML answer failed a check.A wrong signing certificate, or a response for a sign-in the gateway did not start.Read the SAML response could not be processed log line (org sso: for organization SSO).
401 SAML authentication failed. The gateway log has the cause.The SAML answer was read but did not validate.It expired, was sent to another address or names another audience, often because of clock skew.Read the SAML authentication failed log line.
401 SAML assertion contained an invalid subject or email.The assertion has no usable email or subject.The provider sends the email under another attribute.Send a valid email in the attribute named by SAML_ATTRIBUTE_EMAIL.
500 Invalid SAML configuration. The gateway log has the cause. or Invalid SAML service provider metadata. The gateway log has the cause.SAML settings could not be loaded, or the gateway could not build its own metadata.A wrong metadata URL or XML, or a wrong SAML_SP_ENTITY_ID or PROXY_BASE_URL.Read the SAML settings could not be loaded or SAML service provider metadata is invalid log line.
502 Could not parse the identity provider metadata. The gateway log has the cause.An organization's SAML metadata is not valid.A wrong idp.idp_metadata_url or pasted XML.Paste the metadata again, see organization SSO.
404 This sign-in link is not availableAn organization sign-in link was used while its connection is off.The connection is disabled, deleted or not licensed.Turn the connection back on, or use the gateway's own sign-in.
429 Too many sign-in lookups, try again in a minute or Too many sign-in attempts, try again in a minuteOrganization SSO discovery or sign-in is throttled for this address.More than 30 lookups a minute from one address, or every visitor shares the load balancer's address.Wait a minute. Behind a load balancer set trusted_proxy_ranges.
400 Invalid verification codeThe CLI sign-in code typed in the browser is wrong.A typo, or a code from another terminal session.Type the code the terminal printed, or run spanwayctl login again.
400 CLI login session not found or expired. Run spanwayctl login again. ...The CLI sign-in expired, or another replica answered.More than ten minutes passed, or several replicas run without a shared Redis cache.Start again. If it fails at once, configure Redis for every replica.
400 Invalid CLI login session id, CLI login is not ready or Your spanway CLI is out of date ...The CLI poll cannot be answered.A malformed login id, a browser step that is not finished, or an old CLI.Run the current spanwayctl login again and finish the browser step.
403 Invalid CLI polling secret or User does not belong to teamThe poll is not from the terminal that started the sign-in, or the chosen team is not yours.A poll without the secret from /sso/cli/start, or a wrong team.Use the CLI, which sends the secret, and pick one of your teams.
500 Failed to process CLI SSO. The gateway log has the cause. or Error checking session status. The gateway log has the cause.The CLI sign-in failed inside the gateway.Often the cache.Read the Error with CLI SSO callback or Error polling for CLI JWT log line.

The licence and group refusals of SSO sign-in are in the 403 table.

Two-factor sign-in​

Status and messageMeaningFix
401 Invalid codeThe code is wrong, reused or outside the 30 second window.Enter the next code from the app.
401 This sign-in has expired or was already used. Sign in again.The mfa_token is older than five minutes, used up its five attempts or was already used.Sign in again with the password.
401 This account no longer existsThe user was deleted during the sign-in.Ask a proxy admin.
403 Two-factor settings can only be changed from a signed-in Admin UI sessionA /user/mfa route was called with a virtual key or the master key.Use the Admin UI session.
403 Two-factor sign-in is required for this account and cannot be turned offThe gateway or an organization requires it.A proxy admin can reset it with POST /user/mfa/reset.
403 Only proxy admins can reset two-factor sign-inAnother role called POST /user/mfa/reset.Ask a proxy admin.
409 Two-factor sign-in is not set up yet for this account, ... is already set up. Enter a code from your app., ... is already set up. Disable it first to start over., ... is not set up for this accountThe step does not match the account's current setup.Follow the step the message names.
500 Master key is not set, No database connectedThe gateway cannot sign a session or store the setup.Set SPANWAY_MASTER_KEY and DATABASE_URL.

See sign-in security settings.

Admin UI plugins​

Status and messageMeaningFix
503 SPANWAY_SALT_KEY is not configured; plugin iframe auth unavailable.No claim can be issued without the salt key.Set SPANWAY_SALT_KEY.
404 Plugin '<name>' is not registered. or Plugin '<name>' not registeredThe plugin is not in the registry.Check general_settings.plugins.
403 Plugin proxy access requires proxy_admin role.Only proxy admins may use /plugin-proxy.Use a proxy admin key.
502 Cannot connect to plugin '<name>' at <url>The plugin service did not answer.Check that it is up.
502 Plugin '<name>' answered with a redirect, which the gateway does not followThe plugin answered with a 3xx.Make it answer the path directly.

See UI plugins.

Admin Assistant​

Status and messageMeaningFix
404 Admin Assistant is not configured on this proxySPANWAY_ADMIN_AGENT_URL is not set.Set it to the worker's private origin.
403 Sign in to the proxy before connecting Slack, Only proxy admins can connect an Admin Assistant Slack accountNo session, or not a proxy admin.Sign in as a proxy admin.
403 This Slack link was created for a different email addressThe Slack and gateway emails differ.Use the matching account.
403 Cross-origin form submissions are not accepted, The consent form has expired, reopen the link from SlackThe consent form came from another origin or is too old.Open the link from Slack again on the gateway's public address.
410, 404 or 403 Admin Assistant worker rejected this Slack linkThe ten minute link expired or was refused.Send connect again.
503 Admin Assistant worker rejected this Slack linkUsually a different ADMIN_AGENT_SERVICE_TOKEN on the two sides.Set the same token on both and restart.
503 Admin Assistant worker is unreachable, Admin Assistant worker returned an invalid Slack linkThe worker cannot be reached, or another service answered.Check SPANWAY_ADMIN_AGENT_URL.
503 Set PROXY_BASE_URL to the public proxy URL to use Admin Assistant, ADMIN_AGENT_SERVICE_TOKEN must be at least 32 characters, SPANWAY_ADMIN_AGENT_URL must be a bare http(s) origin ...A gateway setting is missing or wrong.Fix the named setting.

See Admin Assistant for Slack.

Code graph​

Code graph routes answer {"detail": {"error": "<message>"}}. Every message, with its fix, is on the code graph page.

Status and messageMeaningFix
403 The 'code_graph' feature needs a Spanway enterprise license. ... or Your Spanway license does not include the 'code_graph' feature. ...No enterprise license, or one without the code graph.Load a license that lists code_graph. It turns on within a minute.
403 Not allowed to <action> code graph repositories (<reason>)The caller's role or team does not allow the action.See who can manage repositories.
403 Repository connection refused: <reason>You, the credential or the host cannot be trusted with the repository. The reason names which.See the reason table.
400 Only a stored GitHub personal access token or GitLab access token credential can be bound to the code graphThe credential is not a source control token.Bind a stored token credential.
400 Mirroring needs acl_server_id, the GitHub or GitLab MCP server users sign in toMirroring was turned on without the MCP server to check access with.Send acl_server_id.
404 No connected repository has that id in this scopeWrong id, or another team's repository.Use an id from GET /code_graph/repos.
409 That repository is already connected in this tenant or That GitHub App installation is already bound to another tenantThe repository or installation is already in use.Reuse it, or disconnect it first.
413, 400 or 401 on /code_graph/webhooks/...A webhook delivery was too large, unreadable or signed with the wrong secret.Rotate the webhook and paste the new secret on the source host.
502 GitHub did not list the installations this user can see, try againThe source host did not answer during an App install.Try again.
503 The code graph is not configured on this gateway, Set SPANWAY_SALT_KEY to sign repository webhooks or No GitHub App is configured for the code graph on this gatewayA setting the code graph needs is missing.Set the named variable and restart.

Workflows​

Workflow routes answer {"detail": "<message>"}. Every message is on its feature page: workflow runner, stored runs, definitions and variables, templates, triggers and Slack, Teams, mail and calendar triggers.

Status and messageMeaningFix
400 The master key cannot start workflow runs; use a virtual key and the other run_as_key messagesRuns always act as one virtual key.Start the run with a virtual key, or name one in run_as_key from the Admin UI.
403 Your role can read workflow runs but not change themA read only role tried a change.Use a role with workflows.write.
404 Workflow run ... not found or Run '...' not foundWrong id, or another key's run.Use the key that created the run.
409 The workflow runner is disabled on this gatewayworkflow_runner.enabled is false.Turn it on.
401 {"error": "invalid signature"} on a Slack, Teams, Outlook, Gmail or Google Calendar deliveryThe service's signature, clientState, channel token or Google token did not match, or the delivery is older than five minutes.Replace the secret on the trigger or check the Gmail push audience and service account.
422 A slack trigger needs provider_secret and the other provider_secret and access messagesA connected service trigger is missing the secret the service issued or its access mapping.Fill in the field the message names.
409 A proxy admin halted workflow definition ...New runs of that saved workflow are stopped.A proxy admin releases it.
409 Another writer appended to this run at the same time, retry the requestAppends to one stored run kept colliding.Send it again.
422 a step plan message, Idempotency-Key was already used with a different request or the message uses vars.<name>, which this definition's organization has not set. ...The plan, the idempotency key or an organization variable is wrong.Fix the step or set the variable.
429 Your organization, team or key already has N active workflow runsThe tenant limit is reached.Wait for Retry-After.
500 The workflow run store could not complete the request, see the gateway log for the causeThe database refused a stored-run request. The cause is only in the gateway log.Read the log line and check the database.

Review queues​

Review routes answer {"detail": {"error": "<message>"}}. Every message is on the review queues page, and the assignment messages are also on the assignment board page.

Status and messageMeaningFix
403 The 'evals' feature needs a Spanway enterprise license. ... or Your Spanway license does not include the 'evals' feature. ...No license, or one without evals.Load a license that lists evals.
403 Only proxy admins can read this resource or Only proxy admins can change this resourceThe role may not read or change queues.Use a proxy admin or a custom role with evals.read or evals.write.
403 you are not a reviewer of queue <queue_id>The caller is not on the queue.Ask an admin to add them.
400 unknown user(s): ..., nothing to update, queue ... collects pass or fail only, send no score and the other 400 messagesThe request breaks a rule of the queue or its source.Follow the message.
400 none of the matching spend log rows carry a request body. ...Production review needs stored prompts.Turn on store_prompts_in_spend_logs.
400 not reviewers of queue <queue_id>: <ids>Work was assigned to someone not named on the queue.Add them to the queue's reviewers or pick another reviewer.
404 queue_id=<id> not found, review_item_id=<id> not found, run_id=<id> not found or dataset_id=<id> not foundWrong id, or another team's queue.Check the id.
409 a review queue named '<name>' already existsThe owner already has that name.Pick another name.
409 claim the item with POST /eval/review/queues/{queue_id}/next before labelling itThe claim expired, or an admin took the item back.Claim the next item again.

Prometheus metrics​

Status and messageMeaningFix
401 Unauthorized access to metrics endpoint: ...The scraper sent no valid key.Give it a virtual key, see Prometheus metrics.
404 on /metricsThe prometheus callback is not on, so the route does not exist.Add prometheus to spanway_settings.callbacks and restart.
Startup stops with Configuration validation failed: or Prometheus exclude configuration validation failed:prometheus_metrics_config, prometheus_exclude_metrics or prometheus_exclude_labels names something that does not exist.Fix the name from the full metric list.
--prometheus_metrics_port must differ from --portThe metrics port and the API port are the same.Pick another port.
Prometheus metrics server exited with code <n> before serving <host>:<port>; is the port already in use? or Prometheus metrics server did not answer <url> within 30sThe separate metrics process did not start.Free the port, or check the host, port and PROMETHEUS_MULTIPROC_DIR.

Client errors​

This section is for the person whose tool or script just failed. Each row gives the text the gateway sends, the HTTP status, the exception the common SDKs raise for it, and the fix. The quoted text is copied from the gateway's code, and a test fails when the code and this table drift apart, so searching this page for a fragment of your error message finds the row.

Errors raised while the gateway checks the key, which covers a missing or wrong key, a model the key may not use and a used-up budget, come back in the OpenAI shape, {"error": {"message": "...", "type": "...", "param": null, "code": "401"}}, on every route except the Anthropic /v1/messages route. There they come back in the Anthropic shape, {"type": "error", "error": {"type": "authentication_error", "message": "..."}}, with the same message, so the Anthropic SDKs read them like any other Anthropic error. The Gemini generateContent and Bedrock routes keep the OpenAI shape for these errors, because the key check runs before the route. SDKs choose the exception by HTTP status, not by body shape, so the classes below hold on every route.

The OpenAI column holds for the OpenAI Python and Node SDKs, which use the same class names. The Anthropic column holds for the Anthropic Python and TypeScript SDKs. The Google Gen AI SDK raises errors.ClientError for any 4xx answer and errors.ServerError for any 5xx answer in Python, and ApiError with a status field in JavaScript.

CaseStatusText the gateway sendsOpenAI SDKAnthropic SDKFix
No key on the request401Authentication Error, No api key passed in.AuthenticationErrorAuthenticationErrorSend the key as Authorization: Bearer <key> or in a header from connect any client.
Wrong or deleted key401Authentication Error, Invalid proxy server token passedAuthenticationErrorAuthenticationErrorCopy the key again from the tool's settings, or create a new one in Virtual Keys.
Blocked key401Authentication Error, Key is blocked. Update via `/key/unblock` if you're an admin.AuthenticationErrorAuthenticationErrorAsk the admin to open the key in Virtual Keys and click Unblock Key.
Expired key401Authentication Error - Expired Key. Key Expiry time <time> and current time <time>AuthenticationErrorAuthenticationErrorAsk the admin to extend the key with /key/update or create a new one.
A plain key on a management route401Only proxy admin can be used to generate, delete, update info for new keys/users/teams.AuthenticationErrorAuthenticationErrorUse the master key or a key owned by a proxy admin.
The key may not use the model403The requested model '<model>' is not available for this API key, or the model name is invalid.PermissionDeniedErrorPermissionDeniedErrorCall GET /v1/models with the key and use a name from the list, or ask the admin to add the model to the key or team.
No deployment carries the model name400Invalid model name passed in model=<name>BadRequestErrorBadRequestErrorUse a name from GET /v1/models. Names are case sensitive.
The provider does not take a parameter you sent400does not support parameters: <names>, for model=<model>BadRequestErrorBadRequestErrorRemove the parameter, or ask the admin to set drop_params: true, see drop params.
The budget is spent422Budget has been exceeded! Key=<key alias> Current cost: <spend>, Max budget: <max>UnprocessableEntityErrorUnprocessableEntityErrorWait for the budget to reset, or ask the admin to raise it. A spent team or member budget shows Team=<id> or User=<id> in Team=<id> where the key alias is. With budget_exceeded_status_code: 429 the gateway answers 429 and the SDKs raise RateLimitError.
The key or team is over its rate limit429Rate limit exceeded for <scope>: <value>. Limit type: <type>.RateLimitErrorRateLimitErrorWait for the reset time in the message, or ask for a higher rpm_limit or tpm_limit. The SDKs retry 429 on their own, so a short burst often recovers without code.
Wrong path, often a doubled /v1404Not FoundNotFoundErrorNotFoundErrorApply the /v1 rule.
The Google Gen AI SDK calls API version v1405Method Not Allowednot usednot usedSet the SDK's API version to v1beta, see Google Gen AI Python SDK.
The provider failed or is overloaded500, 502, 503The provider's own messageInternalServerErrorInternalServerErrorRetry, and ask the admin for a fallback deployment, see reliability.
TLS, connection refused, DNS or timeout before any answernoneNone, the gateway never answeredAPIConnectionError, or APITimeoutError for a timeoutAPIConnectionError, or APITimeoutError for a timeoutWork through connection problems.

The SDKs retry connection errors, 408, 409, 429 and 5xx answers twice by default, and the gateway retries the provider too, so one slow request can turn into several provider attempts. Set max_retries=0 on the client when the gateway's own retries and fallbacks should be the only ones.

Container start errors​

These are printed by the images themselves before the gateway starts, so they appear in docker logs or the pod log rather than in an HTTP answer.

MessageMeaningFix
usage: spanway-container <...> [args], got (...), exit code 2The container command was overridden and does not start with a role.Start it with a role such as proxy, see image errors.
exec: "sh": executable file not found in $PATHdocker exec or kubectl exec asked for a shell, and the images have none.Run a program directly, such as spanwayctl or python.
DATABASE_URL is not set and could not be assembled from the DATABASE_* env vars, so migrations cannot run., exit code 1The migrations job has no database address.Pass DATABASE_URL or the DATABASE_* variables.
Migration job failed after retries., exit code 1The migrations could not be applied.Read the Prisma error above it, fix it and rerun the job.
Spanway dev mode refused to start: <reason>, exit code 1The spanway-ai-dev image could not start its built-in database, for example because DATABASE_URL is set, the state folder is not writable or the volume was made by an older major version of PostgreSQL.Follow the reason, each one is listed in the dev mode errors.

Exception classes​

Errors a provider raised, and a few the gateway raises around the model call, reach the caller as one of these classes. The class name is not the type field. It starts the message instead, for example spanway.RateLimitError: ..., and type is the OpenAI style type in the table. Exception mapping explains how each provider's errors map onto them. A test builds each class whose status is fixed and checks it against this table.

ClassStatustypeMeaningFix
BadRequestError400invalid_request_errorThe provider refused the request as malformed.Read the message, which names the parameter.
UnsupportedParamsError400invalid_request_errorThe model does not take a parameter you sent.Remove it, or set drop_params.
ContextWindowExceededError400invalid_request_errorThe prompt is longer than the model's input window.Shorten it, or turn on fit to context.
ContentPolicyViolationError400invalid_request_errorThe provider's content filter refused the prompt or the answer.Change the content.
RejectedRequestError400invalid_request_errorA guardrail or the provider rejected the request before it ran.Read the message for the rule that fired.
AuthenticationError401authentication_errorThe provider refused the deployment's credential.Fix the provider key on the deployment in Models + Endpoints.
PaymentRequiredError402invalid_request_errorThe provider account is out of credit.Top up the provider account.
PermissionDeniedError403permission_errorThe provider credential may not use that model or region.Grant access at the provider.
NotFoundError404invalid_request_errorThe provider does not know the model or resource.Check the model name on the deployment.
Timeout408invalid_request_errorThe provider did not answer in time.Raise request_timeout or add a fallback.
UnprocessableEntityError422invalid_request_errorThe provider could not process the request.Read the provider message.
JSONSchemaValidationError500internal_server_errorThe answer did not match the requested JSON schema.Turn on structured output repair, which answers 422 when it gives up.
StructuredOutputRepairError422invalid_request_errorA subclass of JSONSchemaValidationError. The answer still did not match the schema after every retry structured output repair allowed.Simplify the schema, raise structured_output_max_retries, or use a stronger model.
RateLimitError429throttling_errorThe provider rate limited the call.Add deployments and let the router retry and fall back.
InternalServerError500internal_server_errorThe provider failed.Retry, or fall back to another deployment.
APIError500internal_server_errorA provider error the gateway could not classify.Read the provider message, and retry.
APIResponseValidationError500internal_server_errorThe provider answered with a body the gateway could not read.Retry, and report the request id if it repeats.
OpenAIError500internal_server_errorAn error raised by the OpenAI compatible client without a status of its own.Read the message.
BadGatewayError502internal_server_errorThe provider's proxy or load balancer failed.Retry, or fall back.
ServiceUnavailableError503internal_server_errorThe provider is overloaded or down.Retry with backoff, or fall back.
APIConnectionError500internal_server_errorThe gateway could not reach the provider.Check api_base and the gateway's egress.
GuardrailRaisedException400, or the status the guardrail setsinvalid_request_errorA guardrail refused the request or the answer. The message reads Guardrail raised an exception, Guardrail: <name>, Message: <reason>.Change the content, or read the guardrail's own page for the rule that fired.
BlockedPiiEntityError400invalid_request_errorA PII guardrail found an entity type it is set to block. The message reads Blocked entity detected: <type> by Guardrail: <name>. This entity is not allowed to be used in this request.Remove the entity from the request, or change the guardrail to mask it instead.
MidStreamFallbackError503, or the provider's statusinternal_server_errorA stream failed after it started and the fallback could not finish it.Add a fallback deployment.
ImageFetchError400invalid_request_errorThe gateway could not download an image URL in the request, or the image is over the size limit. The message names the URL and the status code or size.Use a URL the gateway can reach, or send the image inline as base64.
VectorStoreSearchError400invalid_request_errorA vector store the request grounds on could not be searched, and the request is refused rather than answered without it. code is vector_store_search_failed and the message lists each failed store.Check the vector store named in the message, see vector stores.
SpanwayUnknownProvider400invalid_request_errorThe model names no provider the endpoint supports. The message reads Unmapped LLM provider for this endpoint. You passed model=<model>, custom_llm_provider=<provider>.Prefix the model with its provider, for example openai/<model>, or use a provider that serves this endpoint.
  • Troubleshooting to start from a symptom instead of a status.
  • Connect any client for base URLs, key headers and connection errors before the gateway answers.
  • Log reference for the gateway log lines that accompany these errors.
  • Exception mapping for the SDK exception classes and provider errors.
  • Logs page to find the failing request by id, status or error message.
  • Reliability for retries, fallbacks and timeouts.