Josh Bonczkowski
faae9ad2c0
Additional unit tests to push coverage to almost 90%.
2026-04-24 17:03:19 -04:00
Josh Bonczkowski
c2eed58bff
Adding a few more unit tests to increase the code coverage just a bit more.
2026-04-24 16:57:59 -04:00
Josh Bonczkowski
b8210ee143
Addressing automated feedback from greptile.
2026-04-24 16:29:37 -04:00
Josh Bonczkowski
fb094b63ef
Adding missing definition of new env vars that were causing a build failure.
2026-04-24 15:53:51 -04:00
Josh Bonczkowski
7124e1184d
Fixing in incorrect uv.lock merge.
2026-04-24 15:42:47 -04:00
Josh Bonczkowski
6bb0139fb3
Copying the logo to a committed output directory so it shows up in a locally
...
built container.
2026-04-24 15:00:05 -04:00
Josh Bonczkowski
b5584d2e4c
Putting the New Relic callback in proper alphabetic order.
2026-04-24 15:00:05 -04:00
Josh Bonczkowski
65ad569224
Adding a newrelic image for the UI to use.
2026-04-24 15:00:05 -04:00
Josh Bonczkowski
bf32afb0f2
Configuration for the logging callback definition.
2026-04-24 15:00:05 -04:00
Josh Bonczkowski
ddf74b1b84
Updating linting, adding tests, defining data type for UI.
2026-04-24 15:00:05 -04:00
Josh Bonczkowski
ccaa8c5556
Validating testing / formatting for our changes.
2026-04-24 15:00:05 -04:00
Josh Bonczkowski
615a060d73
Addressing feedback.
2026-04-24 15:00:05 -04:00
Josh Bonczkowski
f0d9b96f7d
Addressing some feedback.
2026-04-24 15:00:05 -04:00
Josh Bonczkowski
6dc714506a
Addressed feedback where the newrelic options might not apply correctly.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
d2fd373e1c
Addressing feedback.
...
- A few more cases were found where the dictionary access might not return the correct value.
- Handling cases where `traceparent` is not lower cased
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
511fca4d9c
Addressing minor feedback on length of generated, fallback traceId.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
ad00671fbb
Addressing feedback about a potential issue around a timestamp for the
...
supportability metric.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
8aeaaa3808
Adding a new catch exception block based on feedback.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
6101890893
Addressing feedback on accessing default values. Added tests for most of
...
these cases.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
37d8be3779
Addressing feedback for potential better practice.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
807b8ed72d
Updating the NR event timestamps to more accurately reflect when
...
the messages were generated.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
855dd592c8
Addressing minor feedback
...
- Put a cap on newrelic version on v13. v12 just released and is still compatible.
- Ensured the shell script ends in a newline
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
aba60d19ae
Addressing feedback.
...
- When an error occurs, still check if the periodic supportability metric should be emitted
- Added a check to ensure the extension is ready in the error handler to match _process_success
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
4b177e23ff
Addressing new feedback.
...
- Proper handling of time to floats. Created a util method and updated code to use it.
- added the missing guard to ensure the app is enabled
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
6fb7a586eb
Addressing additional automated feedback.
...
- Removed a legacy comment about the New Relic header
- Reordered imports in one file
- Switched another file to use the import at the top of the file instead of inline when used
- Added unit tests for untested methods that were identified
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
9ff663e8bb
Reformating for the linter.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
e9651e2180
Address reviewer feedback on New Relic integration.
...
- Fix _record_error_metric to use app.record_custom_metric() instead of
module-level newrelic.agent.record_custom_metric() so the call works
outside of an active transaction context
- Remove unreachable except ImportError block in _get_trace_context
- Update stale "23 hours" comment to "27 hours" (matches 97200s threshold)
- Remove commented-out debug code from _process_success
- Fix docs typo: NEW_RELIC_CUSTOM_INSIGHTS_EVENTS_MAX_SAMPLES_STOREDA ->
NEW_RELIC_CUSTOM_INSIGHTS_EVENTS_MAX_SAMPLES_STORED
- Update TestRecordErrorMetric to verify app.record_custom_metric call
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
3db9fbc24a
Updating linting and the unit tests that are not running in the CI environment.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
183b95d46f
Adding unit tests for the New Relic extension.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
522d3f43c7
Moving New Relic imports into the methods to support unit tests.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
283e381a0b
Updating LiteLLM documentation for New Relic extension.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
3e6ab1d28b
Updating newrelic.md document.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
bc27cb17ad
Use a proper name for the doc file.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
2eaae4ee66
Initial version of public doc for New Relic.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
35f06ac245
Removing debugging.
...
Fixed logic / comments around how often to send supportability metric.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
34e6866ca9
Cleaning up logic to turn off recording content via either the
...
LiteLLM configuration or an env var.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
1dd2a4f007
Mised file.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
994a506a05
Implementing a configuration so that users can use litellm configuration
...
to disable sending LLM messages to New Relic. There is a second method
to do this via New Relic env var.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
5100a4b6c7
Use a fake trace_id if we cannot find one.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
db149980c4
If we cannot find trace information, send the AI events without the
...
trace ID attached.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
129d2ba505
Enabling New Relic agent to be wired when docker container starts if an environment variable
...
is set.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
6247823ac2
Make use of turn_off_message_logging configuration that is available
...
by default from CustomLogger.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
f86ccdf4b5
Add the start/end times to the messages before sending them so that the
...
start time and end time reflect the correct time and both are not set
to 'now'.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
c6ea6b883c
Emit supportability metric every hour instead of once a day.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
478d8d1d52
Supportability metric is sent on first request.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
d73498f77d
Implemented basic support for the success path. Generates New Relic
...
custom events needed by the AI Monitorin interface.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
efbcd04e03
Minor fixes for basic observability.
2026-04-24 15:00:04 -04:00
Josh Bonczkowski
085520a901
initial New Relic integration.
2026-04-24 15:00:04 -04:00
shubham-arora-clear
e5786c6c35
fix(bedrock): preserve cache_control TTL on tools for Claude 4.5+ ( #25855 )
...
Bedrock enforces non-increasing TTL ordering across cache_control blocks
(tools → system → messages). The tool cache_control TTL was being
unconditionally dropped to the default 5m, while system blocks preserved
the user-specified TTL for Claude 4.5+ models. This mismatch caused
"a ttl='1h' block must not come after a ttl='5m' block" errors when
users set ttl='1h' on both tools and system.
Converse path: add_cache_point_tool_block() now accepts a model param
and preserves TTL for Claude 4.5+, matching _get_cache_point_block().
Invoke path: _remove_ttl_from_cache_control() now also processes tools
(was only processing system and messages).
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 21:54:26 -07:00
yuneng-jiang
e9e86ed956
Merge pull request #26298 from BerriAI/litellm_internal_staging
...
[Infra] Promote interal staging to main
2026-04-22 19:16:23 -07:00