Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/fix-openai-decision-spans.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"braintrust": patch
---

fix(openai): align Decisions spans with Python SDK

OpenAI Decisions spans now use the `decision` span type, `question_{index}` IDs for unnamed or repeated questions, `boolean:`-prefixed keys for boolean choices that collide with string choices, and `{label, description}` score criteria, matching the Python SDK and the Braintrust gateway.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ span_tree:
│ │ "caller_functionname": "runOperation",
│ │ "caller_lineno": 0
│ │ }
│ │ └── openai.decisions.create [question]
│ │ └── openai.decisions.create [decision]
│ │ input: {
│ │ "questions": [
│ │ {
Expand Down Expand Up @@ -94,7 +94,7 @@ span_tree:
│ │ "caller_functionname": "runOperation",
│ │ "caller_lineno": 0
│ │ }
│ │ └── openai.decisions.create [question]
│ │ └── openai.decisions.create [decision]
│ │ input: {
│ │ "questions": [
│ │ {
Expand Down Expand Up @@ -154,7 +154,7 @@ span_tree:
│ │ "caller_functionname": "runOperation",
│ │ "caller_lineno": 0
│ │ }
│ │ └── openai.decisions.create [question]
│ │ └── openai.decisions.create [decision]
│ │ input: {
│ │ "questions": [
│ │ {
Expand Down Expand Up @@ -218,7 +218,7 @@ span_tree:
│ │ "caller_functionname": "runOperation",
│ │ "caller_lineno": 0
│ │ }
│ │ └── openai.decisions.create [question]
│ │ └── openai.decisions.create [decision]
│ │ input: {
│ │ "questions": [
│ │ {
Expand All @@ -237,8 +237,14 @@ span_tree:
│ │ },
│ │ {
│ │ "criteria": [
│ │ "routine: Can wait",
│ │ "urgent: Needs attention today"
│ │ {
│ │ "description": "Can wait",
│ │ "label": "routine"
│ │ },
│ │ {
│ │ "description": "Needs attention today",
│ │ "label": "urgent"
│ │ }
│ │ ],
│ │ "id": "<span:3>",
│ │ "instructions": "How urgent is this request?",
Expand Down Expand Up @@ -302,7 +308,7 @@ span_tree:
│ │ "caller_functionname": "runOperation",
│ │ "caller_lineno": 0
│ │ }
│ │ └── openai.decisions.create [question]
│ │ └── openai.decisions.create [decision]
│ │ input: {
│ │ "questions": [
│ │ {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ span_tree:
│ │ "caller_functionname": "runOperation",
│ │ "caller_lineno": 0
│ │ }
│ │ └── openai.decisions.create [question]
│ │ └── openai.decisions.create [decision]
│ │ input: {
│ │ "questions": [
│ │ {
Expand Down Expand Up @@ -94,7 +94,7 @@ span_tree:
│ │ "caller_functionname": "runOperation",
│ │ "caller_lineno": 0
│ │ }
│ │ └── openai.decisions.create [question]
│ │ └── openai.decisions.create [decision]
│ │ input: {
│ │ "questions": [
│ │ {
Expand Down Expand Up @@ -154,7 +154,7 @@ span_tree:
│ │ "caller_functionname": "runOperation",
│ │ "caller_lineno": 0
│ │ }
│ │ └── openai.decisions.create [question]
│ │ └── openai.decisions.create [decision]
│ │ input: {
│ │ "questions": [
│ │ {
Expand Down Expand Up @@ -218,7 +218,7 @@ span_tree:
│ │ "caller_functionname": "runOperation",
│ │ "caller_lineno": 0
│ │ }
│ │ └── openai.decisions.create [question]
│ │ └── openai.decisions.create [decision]
│ │ input: {
│ │ "questions": [
│ │ {
Expand All @@ -237,8 +237,14 @@ span_tree:
│ │ },
│ │ {
│ │ "criteria": [
│ │ "routine: Can wait",
│ │ "urgent: Needs attention today"
│ │ {
│ │ "description": "Can wait",
│ │ "label": "routine"
│ │ },
│ │ {
│ │ "description": "Needs attention today",
│ │ "label": "urgent"
│ │ }
│ │ ],
│ │ "id": "<span:3>",
│ │ "instructions": "How urgent is this request?",
Expand Down Expand Up @@ -302,7 +308,7 @@ span_tree:
│ │ "caller_functionname": "runOperation",
│ │ "caller_lineno": 0
│ │ }
│ │ └── openai.decisions.create [question]
│ │ └── openai.decisions.create [decision]
│ │ input: {
│ │ "questions": [
│ │ {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ span_tree:
│ │ "caller_functionname": "runOperation",
│ │ "caller_lineno": 0
│ │ }
│ │ └── openai.decisions.create [question]
│ │ └── openai.decisions.create [decision]
│ │ input: {
│ │ "questions": [
│ │ {
Expand Down Expand Up @@ -94,7 +94,7 @@ span_tree:
│ │ "caller_functionname": "runOperation",
│ │ "caller_lineno": 0
│ │ }
│ │ └── openai.decisions.create [question]
│ │ └── openai.decisions.create [decision]
│ │ input: {
│ │ "questions": [
│ │ {
Expand Down Expand Up @@ -154,7 +154,7 @@ span_tree:
│ │ "caller_functionname": "runOperation",
│ │ "caller_lineno": 0
│ │ }
│ │ └── openai.decisions.create [question]
│ │ └── openai.decisions.create [decision]
│ │ input: {
│ │ "questions": [
│ │ {
Expand Down Expand Up @@ -218,7 +218,7 @@ span_tree:
│ │ "caller_functionname": "runOperation",
│ │ "caller_lineno": 0
│ │ }
│ │ └── openai.decisions.create [question]
│ │ └── openai.decisions.create [decision]
│ │ input: {
│ │ "questions": [
│ │ {
Expand All @@ -237,8 +237,14 @@ span_tree:
│ │ },
│ │ {
│ │ "criteria": [
│ │ "routine: Can wait",
│ │ "urgent: Needs attention today"
│ │ {
│ │ "description": "Can wait",
│ │ "label": "routine"
│ │ },
│ │ {
│ │ "description": "Needs attention today",
│ │ "label": "urgent"
│ │ }
│ │ ],
│ │ "id": "<span:3>",
│ │ "instructions": "How urgent is this request?",
Expand Down Expand Up @@ -302,7 +308,7 @@ span_tree:
│ │ "caller_functionname": "runOperation",
│ │ "caller_lineno": 0
│ │ }
│ │ └── openai.decisions.create [question]
│ │ └── openai.decisions.create [decision]
│ │ input: {
│ │ "questions": [
│ │ {
Expand Down
Loading
Loading