BerriAI/litellm · error · Exception

[Non-Blocking] LiteLLM.Success_Call Error: {e}

Error message

[Non-Blocking] LiteLLM.Success_Call Error: {e}

What it means

LiteLLM's post-success logging path (_track succeeded-call metrics such as completion_cost) hit an unexpected internal exception (e.g. a cost-calculation failure from an unmapped model) and re-wraps it as '[Non-Blocking] LiteLLM.Success_Call Error'. Despite the 'Non-Blocking' label, this re-raise propagates out of the logging helper and can surface to the caller, masking the original exception text after the prefix.

Source

Thrown at litellm/litellm_core_utils/litellm_logging.py:1969

                litellm.max_budget
                and self.stream is False
                and result is not None
                and isinstance(result, dict)
                and "content" in result
            ):
                time_diff: Final = (end_time - start_time).total_seconds()
                float_diff: Final = float(time_diff)
                litellm._current_cost += litellm.completion_cost(
                    model=self.model,
                    prompt="",
                    completion=getattr(result, "content", ""),
                    total_time=float_diff,
                    standard_built_in_tools_params=self.standard_built_in_tools_params,
                )

            return start_time, end_time, result
        except Exception as e:
            raise Exception(f"[Non-Blocking] LiteLLM.Success_Call Error: {e}")

    def _is_recognized_call_type_for_logging(
        self,
        logging_result: object,
    ):
        """
        Returns True if the call type is recognized for logging (eg. ModelResponse, ModelResponseStream, etc.)
        """
        if (
            isinstance(logging_result, ModelResponse)
            or isinstance(logging_result, ModelResponseStream)
            or isinstance(logging_result, EmbeddingResponse)
            or isinstance(logging_result, ImageResponse)
            or isinstance(logging_result, TranscriptionResponse)
            or isinstance(logging_result, TextCompletionResponse)
            or isinstance(logging_result, HttpxBinaryResponseContent)  # tts
            or isinstance(logging_result, RerankResponse)
            or isinstance(logging_result, FineTuningJob)

View on GitHub (pinned to 6c2dcb801b)

Solutions

  1. Read the text after '[Non-Blocking] LiteLLM.Success_Call Error:' — it contains the underlying exception; fix that root cause (usually add pricing)
  2. Add cost info for your model via a custom model_prices file passed as litellm.model_cost_dict_url / lilypad model_prices, or set model_info cost fields in config.yaml
  3. Upgrade LiteLLM so bundled model_prices_and_context_window.json covers your model
  4. As a workaround suppress cost tracking for that call: litellm.completion(..., mock_response=...) style tests aside, drop_success_events=True or disable cost logging callbacks for the unknown model

Example fix

# before
resp = litellm.completion(model='my-private-model', messages=msgs)
# -> Exception: [Non-Blocking] LiteLLM.Success_Call Error: cost mapping not found for model

# after: supply pricing in config.yaml
model_list:
  - model_name: "my-private-model"
    litellm_params:
      model: "openai/gpt-4o"
    model_info:
      input_cost_per_token: 0.0000025
      output_cost_per_token: 0.00001
Defensive patterns

Strategy: try-catch

Validate before calling

import litellm

def has_cost_mapping(model: str) -> bool:
    try:
        litellm.completion_cost(model=model, prompt='x', completion='y')
        return True
    except Exception:
        return False

Try / catch

try:
    resp = litellm.completion(model='my-private-model', messages=msgs)
except Exception as e:
    if str(e).startswith('[Non-Blocking] LiteLLM.Success_Call Error'):
        # request actually succeeded; the wrapper hides the real cause in str(e)
        logging.warning('success-logging failed: %s', e)
    else:
        raise

Prevention

When it happens

Trigger: A completion/embedding succeeds, then during success logging litellm.completion_cost(...) raises — typically because the model has no cost mapping (model not in model_prices_and_context_window.json and no custom pricing) or standard_built_in_tools_params are malformed.

Common situations: Custom/private model names without cost entries; newly released models on an older LiteLLM; a misconfigured custom_pricing file; the exception chained after the prefix contains the real cause (often 'cost mapping not found').

Related errors


AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15). Data as JSON: /api/errors/cbe7e6abb9f7521c. Report an issue: GitHub.