Skip to content

[feat] [sdk] @cozeloop/ai@0.0.11 with PTaaS trace and output support #21

Merged
mocayo merged 4 commits into
mainfrom
feat/ptaas-trace
Nov 20, 2025
Merged

[feat] [sdk] @cozeloop/ai@0.0.11 with PTaaS trace and output support #21
mocayo merged 4 commits into
mainfrom
feat/ptaas-trace

Conversation

@mocayo

@mocayo mocayo commented Nov 20, 2025

Copy link
Copy Markdown
Collaborator

Summary

This PR adds comprehensive tracing and output handling capabilities for PTaaS (Prompt as a Service) in the @cozeloop/ai package, released as version 0.0.11.

Changes

🎯 Features

  • PTaaS Trace Support: Added trace collection and propagation for PTaaS streaming responses

  • PTaaS Output Enhancement: Improved output handling for PTaaS responses

    • Enhanced output processing in PTaaS module
    • Added support for tool call streaming (mock data: ptaas-toolcall-stream.txt)

📝 Documentation

  • Updated README with new PTaaS capabilities (both English and Chinese versions)

🧪 Testing

  • Expanded test coverage for PTaaS functionality
  • Added comprehensive trace propagation tests (121 new test lines)
  • Enhanced PTaaS trace tests (889 lines with significant improvements)
  • Added mock data for tool call streaming scenarios

📦 Version

  • Bumped package version to 0.0.11

Related Commits

  • 45c7122: chore(cozeloop-ai): change log
  • 801ea8c: feat(cozeloop-ai): bump to 0.0.11
  • 99417eb: feat(cozeloop-ai): ptaas output
  • ee7d413: feat(cozeloop-ai): ptaas trace

@codecov

codecov Bot commented Nov 20, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.73643% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/cozeloop-ai/src/prompt/collect-stream.ts 90.90% 11 Missing ⚠️
@@            Coverage Diff             @@
##             main      #21      +/-   ##
==========================================
+ Coverage   90.57%   90.88%   +0.31%     
==========================================
  Files          59       60       +1     
  Lines        3245     3501     +256     
  Branches      748      810      +62     
==========================================
+ Hits         2939     3182     +243     
- Misses        302      318      +16     
+ Partials        4        1       -3     
Components Coverage Δ
@cozeloop/ai 94.15% <95.73%> (+0.08%) ⬆️
@cozeloop/langchain 82.76% <ø> (ø)
Files with missing lines Coverage Δ
packages/cozeloop-ai/src/index.ts 100.00% <ø> (ø)
packages/cozeloop-ai/src/prompt/index.ts 100.00% <ø> (ø)
packages/cozeloop-ai/src/prompt/ptaas.ts 95.74% <100.00%> (+0.74%) ⬆️
packages/cozeloop-ai/src/prompt/trace.ts 100.00% <100.00%> (ø)
packages/cozeloop-ai/src/tracer/index.ts 100.00% <ø> (ø)
.../cozeloop-ai/src/tracer/utils/propagation/index.ts 100.00% <100.00%> (ø)
packages/cozeloop-ai/src/prompt/collect-stream.ts 90.90% <90.90%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mocayo mocayo enabled auto-merge (squash) November 20, 2025 03:11
@mocayo mocayo merged commit 1c48d1f into main Nov 20, 2025
14 checks passed
@mocayo mocayo deleted the feat/ptaas-trace branch November 20, 2025 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants