Skip to content

Conversation

@koxudaxi
Copy link
Collaborator

@koxudaxi koxudaxi commented Dec 10, 2025

TL;DR

Added API client support for annotations and functions endpoints.

What changed?

  • Added new annotations module with client classes for managing annotations:

    • AnnotationsClient and AsyncAnnotationsClient for synchronous and asynchronous operations
    • Support for CRUD operations: list, create, get, update, and delete annotations
    • Added response types for all annotation operations
  • Added new functions module with client classes for managing functions:

    • FunctionsClient and AsyncFunctionsClient for synchronous and asynchronous operations
    • Support for listing, registering, and retrieving functions
    • Added request and response types for all function operations
  • Added utility type NumberFromString for handling numeric parameters passed as strings

How to test?

Test the new API clients by making requests to the annotations and functions endpoints:

from mirascope.api._generated import Mirascope

# Test annotations
client = Mirascope()
annotations = client.annotations.list()
annotation = client.annotations.create(
    span_id="span123",
    trace_id="trace456",
    label="Test annotation"
)

# Test functions
functions = client.functions.list()
function = client.functions.get("function-id")

For async usage:

import asyncio
from mirascope.api._generated import AsyncMirascope

async def test():
    client = AsyncMirascope()
    annotations = await client.annotations.list()
    functions = await client.functions.list()

asyncio.run(test())

Why make this change?

This change adds client support for two important API endpoints - annotations and functions. Annotations allow users to add metadata to traces and spans for better observability, while the functions API enables registering and managing functions. These additions complete the API client implementation, providing a comprehensive interface for interacting with the Mirascope platform.

This was referenced Dec 10, 2025
@koxudaxi koxudaxi force-pushed the 12-10-feat_api_add_annotations_api_endpoints branch from c667f8a to 2b80fdc Compare January 5, 2026 12:55
@koxudaxi koxudaxi force-pushed the 12-10-chore_api_regenerate_python_sdk_for_functions_and_annotations branch from e580f67 to dc575f9 Compare January 5, 2026 13:00
@koxudaxi koxudaxi force-pushed the 12-10-feat_api_add_annotations_api_endpoints branch from 2b80fdc to 8f0a610 Compare January 5, 2026 13:00
@koxudaxi koxudaxi force-pushed the 12-10-chore_api_regenerate_python_sdk_for_functions_and_annotations branch 2 times, most recently from bdbcf86 to b4a634c Compare January 5, 2026 13:36
@koxudaxi koxudaxi force-pushed the 12-10-feat_api_add_annotations_api_endpoints branch from 8f0a610 to 81e805a Compare January 5, 2026 14:32
@koxudaxi koxudaxi force-pushed the 12-10-chore_api_regenerate_python_sdk_for_functions_and_annotations branch from b4a634c to a7757af Compare January 5, 2026 14:32
@willbakst willbakst changed the base branch from 12-10-feat_api_add_annotations_api_endpoints to graphite-base/1631 January 6, 2026 02:46
@willbakst willbakst force-pushed the 12-10-chore_api_regenerate_python_sdk_for_functions_and_annotations branch from a7757af to d9370d2 Compare January 6, 2026 02:50
@willbakst willbakst changed the base branch from graphite-base/1631 to 12-10-feat_api_add_annotations_api_endpoints January 6, 2026 02:50
@willbakst willbakst force-pushed the 12-10-feat_api_add_annotations_api_endpoints branch from 610ec45 to e282c2a Compare January 6, 2026 02:52
@willbakst willbakst force-pushed the 12-10-chore_api_regenerate_python_sdk_for_functions_and_annotations branch 2 times, most recently from 9c09fca to ad12d68 Compare January 6, 2026 03:12
@willbakst willbakst force-pushed the 12-10-feat_api_add_annotations_api_endpoints branch from e282c2a to 911fc8f Compare January 6, 2026 03:12
@willbakst willbakst force-pushed the 12-10-chore_api_regenerate_python_sdk_for_functions_and_annotations branch from ad12d68 to 083cf6b Compare January 6, 2026 03:15
@willbakst willbakst force-pushed the 12-10-feat_api_add_annotations_api_endpoints branch 3 times, most recently from f2bd0ca to 2a6f20a Compare January 6, 2026 03:25
@willbakst willbakst force-pushed the 12-10-chore_api_regenerate_python_sdk_for_functions_and_annotations branch from 083cf6b to 8931b9b Compare January 6, 2026 03:25
@willbakst willbakst force-pushed the 12-10-feat_api_add_annotations_api_endpoints branch 2 times, most recently from ef27a5c to 7b85508 Compare January 6, 2026 03:30
@willbakst willbakst changed the base branch from 12-10-feat_api_add_annotations_api_endpoints to graphite-base/1631 January 6, 2026 03:35
@willbakst willbakst force-pushed the 12-10-chore_api_regenerate_python_sdk_for_functions_and_annotations branch from 8931b9b to 9b54fa6 Compare January 6, 2026 03:37
@graphite-app graphite-app bot changed the base branch from graphite-base/1631 to v2 January 6, 2026 03:38
@graphite-app
Copy link

graphite-app bot commented Jan 6, 2026

Merge activity

  • Jan 6, 3:38 AM UTC: Graphite rebased this pull request, because this pull request is set to merge when ready.
  • Jan 6, 3:41 AM UTC: @willbakst merged this pull request with Graphite.

@willbakst willbakst merged commit eeea93a into v2 Jan 6, 2026
14 of 22 checks passed
@willbakst willbakst deleted the 12-10-chore_api_regenerate_python_sdk_for_functions_and_annotations branch January 6, 2026 03:41
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.

3 participants