| 2888 | } |
| 2889 | |
| 2890 | func contextWithRequestedModelAlias(ctx context.Context, opts cliproxyexecutor.Options, fallback string) context.Context { |
| 2891 | alias := requestedModelAliasFromOptions(opts, fallback) |
| 2892 | ctx = coreusage.WithRequestedModelAlias(ctx, alias) |
| 2893 | effort := reasoningEffortFromOptions(opts) |
| 2894 | if effort != "" { |
| 2895 | ctx = coreusage.WithReasoningEffort(ctx, effort) |
| 2896 | } |
| 2897 | serviceTier := serviceTierFromOptions(opts) |
| 2898 | if serviceTier != "" { |
| 2899 | ctx = coreusage.WithServiceTier(ctx, serviceTier) |
| 2900 | } |
| 2901 | return ctx |
| 2902 | } |
| 2903 | |
| 2904 | func requestedModelAliasFromOptions(opts cliproxyexecutor.Options, fallback string) string { |
| 2905 | fallback = strings.TrimSpace(fallback) |